-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only Works with List #11
Comments
I'm having the same issue too. +1 |
@Bubba8291 I was actually able to figure out how to get it to work with scroll views. You can find my fork here: https://github.com/Peter-Schorn/SwiftUIRefresh |
@Peter-Schorn Unfortunately, it didn't work for me. Are you on Xcode beta? If so, which one. I'm on Xcode B3, so maybe that's why. |
I just tested in in beta 2 (12A6159), and I have found that when you attach This works: ScrollView {
VStack {
ForEach(data, id: \.self) { item in
Text(item)
.padding()
}
}
.pullToRefresh(
isRefreshing: $isRefreshing,
onRefresh: onRefresh
)
} But this does not: ScrollView {
VStack {
ForEach(data, id: \.self) { item in
Text(item)
.padding()
}
}
}
.pullToRefresh(
isRefreshing: $isRefreshing,
onRefresh: onRefresh
) |
The code worked in Xcode B3 for me. |
@Bubba8291 Did you have the same issue with the activity indicator Benning to high up on the screen? |
I tried your suggested method. It doesn't work for me, unfortunately. |
I ended up writing an alternative version, but somewhat based on this repo, for my https://gist.github.com/bradley/7517e6592a3621bf57aa5dbb7395e394 |
This only seems to work with lists. There are many cases where I cannot use a list but would still like to enable pull down to refresh. For example, how would I enable this on a
ScrollView
?The text was updated successfully, but these errors were encountered: