14 questions
2
votes
1
answer
187
views
How to programmatically trigger SwiftUI's .refreshable loading animation?
I have a SwiftUI List with .refreshable modifier that works perfectly when users manually pull to refresh.
However, I need to programmatically trigger the same refresh animation when certain ...
1
vote
1
answer
196
views
SwiftUI .refreshable default progressView not shown if parentView has .navigationBarTitleDisplayMode(.large)
I have a strange problem. I have a view with a list and I add the .refreshable to it to load data. The data was loaded, but the default progressView of the pull-to-refresh was not appearing.
I load ...
0
votes
1
answer
81
views
Refreshable closure not having access to model? Is this a bug?
I've come along a strange behaviour of .refreshable that is illustrated with the code below:
struct ContentView: View {
@State private var cntrl=ContentViewController()
@State ...
6
votes
3
answers
826
views
SwiftUI Fetching data cancelled when refreshing a task
When I'm fetching data from a remote server using the .task modifier and then trying to refresh the said data with the .refreshable modifier in a ScrollView gives me an error:
NSURLErrorDomain Code=-...
2
votes
2
answers
847
views
.onAppear is not called on my list items after I use the refresh control
I am trying to implement pagination on my lazyvgrid as well as a refresh control.
initially when the page loads, the pagination works - onAppear is called for each cell.
but when I pull to refresh, ...
0
votes
1
answer
1k
views
SwiftUI ScrollView Refreshable doesn't work appropriately
I'm developing in iOS version 16.0 and I have an issue with refreshing scrollview within SwiftUI. I want to refresh and reload data for ScrollView from CoreData, and the ScrollView Code is written ...
5
votes
1
answer
4k
views
SwiftUI Refreshable With Custom Loading View
I have a refreshable Scroll View using .refreshable and it works exactly how I need it to except for the loading view. How can I hide or replace that loading wheel?
.refreshable {
Task {
...
5
votes
2
answers
2k
views
SwiftUI + Refreshable: Large Navigation titile jumps when pull to refresh is engaged
I have this issue with pull to refresh & navigation bar.
The problem is that the navigation title jumps back to top as soon as refresh is done(without user actually releasing pull to refresh).
Is ...
-1
votes
3
answers
389
views
.refreshable continues to further NavigationStack views - how to stop it?
I have set a .refreshable modifier on one of my views (attached to a VStack). This view has NavigationLinks to other pages, but unexpectedly the refreshable still works in the next pages on the ...
4
votes
2
answers
1k
views
How to disable refreshable in nested view which is presented as sheet/fullscreenCover in SwiftUI?
I am using .refreshable to List in Home Screen. When user clicks on any cell item from the List, presenting DetailsView by sheet/fullscreenCover. But, .refreshable is still attached with DetailsView.
...
1
vote
2
answers
2k
views
SwiftUI - Get data in remote JSON data to refresh on App startup
I am a noob (and my code/model currently will show it so please go easy on me!).
I’m taking a first whack at creating a recipes style (cenotes) app.
So that I can update the data I have a remote json ...
5
votes
1
answer
3k
views
How can you Drag to refresh a Grid View (LazyVGrid) in Swiftui?
How do you drag to refresh a grid view in swiftui? I know you can do it with List view with refreshable modifier in iOS 15, but how can you do it with a LazyVGrid? How would you do it in either List ...
3
votes
2
answers
2k
views
SwiftUI - Use .refreshable on ForEach to empower pull to refresh experience
I'm making use of the new .refreshable() function. For Testing purposes I'm having this simple sleep function:
func load() async {
await Task.sleep(2 * 1_000_000_000)
}
Appending ...
9
votes
0
answers
2k
views
SwiftUI How to use .refreshable view modifier without a list?
iOS 15 introduces the '.refreshable' View Modifier, but most of the examples I've seen use a List. I want to implement a pull to refresh feature in an app that does not use a list but just a VStack ...