Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- struct
- 글또
- mvvm
- error
- uikit
- Switch
- Animation
- SWIFTUI
- Observer
- array
- segue
- PushNotification
- apns
- CoreImage
- singleton
- escaping
- viewlifecycle
- NotificationCenter
- self
- Refresh
- SWIFT
- 화면전환
- Git
- IOS
- ScrollView
- calendar
- 고차함수
- list
- http
- class
Archives
- Today
- Total
목록Refresh (2)
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.
SwiftUI) 하단 Refresh 추가하기
📘 SwiftUI - 하단 RefreshScrollView나 list를 다루다보니 앱의 마지막에 도착했을 때 refresh를 추가하고 싶어지는 경우가 있었다이 때 해결방안을 정리해두려 한다.🔹하단 갱신 방법 ✅ ScrollView에서 하단 감지 후 refresh 구현ScrollView { LazyVStack { ForEach(.., id: \.self) { item in .. } if isLoading { ProgressView() .padding() } else { GeometryReader { geometry in Color.clear ..
IOS/SwiftUI
2022. 8. 24.