본문 바로가기

seong_hye, the developer

검색하기
seong_hye, the developer
프로필사진 seong_hye

  • My P_Life (119) N
    • JAVA (3)
    • 알고리즘 코드 (3)
    • IOS (55) N
      • SwiftUI (25)
      • UIKit (13)
      • Error (7)
    • Infomation (6)
      • Firebase (1)
      • Git (1)
    • Daily Life (3)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/09   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Tags
  • segue
  • IOS
  • singleton
  • NotificationCenter
  • Observer
  • PushNotification
  • list
  • Git
  • mvvm
  • protocol
  • Animation
  • 화면전환
  • SWIFT
  • array
  • class
  • http
  • 고차함수
  • 글또
  • calendar
  • SWIFTUI
  • struct
  • escaping
  • uikit
  • apns
  • Refresh
  • Switch
  • ScrollView
  • viewlifecycle
  • error
  • self
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록divide (1)

seong_hye, the developer

Swift) 배열 데이터 나누고 리플래시로 받아오기

📘배열 나누기 SwiftUI에서 배열 데이터가 너무 많아 리플래시를 활용해 데이터를 나누고 추가로 받아오는 방식을 정리해보려 함 🔹배열 나누는 코드@State private var fullData = Arry(1...1000) // 전체 데이터@State private var visibleData : [Int] = [] // 화면에 보일 데이터@State private var batchSize = 20func divideArray() { let nextEnd = min(visibleData.count + batchSize, fullData.count) let nextItems = fullData[visibleData.count ..- 전체 데이터 사이즈를 통해 20개씩 받아올 수 있도록 코드..

IOS/SwiftUI 2022. 11. 16.
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바