Questions tagged [refreshable]
12 questions
7
votes
0 answers
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 with Text views like the below. How can I…

GarySabo
- 5,806
- 5
- 49
- 124
5
votes
1 answer
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 or Grid view pre iOS 15? I pretty new at swiftui.…

TheManOfSteell
- 105
- 9
3
votes
2 answers
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.
How to disable refreshable in nested view…

Jay Patel
- 2,642
- 2
- 18
- 40
2
votes
2 answers
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 this to a list works fine:
.refreshable {
…

SwiftUIRookie
- 591
- 7
- 16
1
vote
1 answer
.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, onAppear is not called on the cells, so only the…

Halpo
- 2,982
- 3
- 25
- 54
1
vote
1 answer
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 it possible to avoid? Don't remember having this…

kironet
- 766
- 2
- 11
- 27
1
vote
2 answers
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 file, so users won't have to reinstall to get the…

user18175514
- 15
- 4
0
votes
0 answers
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 like this.
ScrollView {
Spacer()
…

박성민
- 3
- 3
0
votes
0 answers
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 {
// Reload
}
}

tHatpart
- 1,302
- 3
- 12
- 27
0
votes
0 answers
SwiftUI Update NavigationView > List > ForEach with .refreshable?
I have code with NavigationView and List view that contains a ForEach with NavigationLink. My problem is in the view when user pressing button save with user info id, username etc. in ContentView that info appears only after refreshing app, so my…
0
votes
0 answers
SWIFTUI refreshable viewModifier
For SWIFTUI i have created a ViewModifier to use the refreshable(action) view modifier available under iOS15.
with this modifier I don't have to embed my all view in availability check.
It's seems to work properly, but I'm not confortable with the…

swordse
- 1
- 2
-1
votes
3 answers
.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 NavigationStack.
i.e. I can still pull to refresh in…

Ori C.
- 61
- 7