Disable RefreshControl on iOS 16

Causes crashes
This commit is contained in:
Arkadiusz Fal
2022-06-26 23:15:07 +02:00
parent e738bc4575
commit 0747960f5e

View File

@@ -17,7 +17,10 @@ struct RefreshControlModifier: ViewModifier {
}
func body(content: Content) -> some View {
content
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, *) {
return content
} else {
return content
.background(
GeometryReader { geometry in
ScrollViewMatcher(
@@ -34,6 +37,7 @@ struct RefreshControlModifier: ViewModifier {
)
}
}
}
extension View {
func refreshControl(onValueChanged: @escaping (_ refreshControl: UIRefreshControl) -> Void) -> some View {