-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Hello Introspect Team
I'm using your great tool to disable gestures in page TabView
unfortunatly it stop working in ios 15 after switch to new introspect.
in iOS 16 and iOS 17 it is working OK
struct ContentView: View {
var body: some View {
TabView {
Text("Page 1").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red)
Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue)
}
.tabViewStyle(.page(indexDisplayMode: .always))
.introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17)) {
print(type(of: $0)) // UICollectionView
$0..gestureRecognizers?.removeAll()
}
}
}
note in deprecated style was working:
struct ContentView: View {
var body: some View {
TabView {
Text("Page 1").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red)
Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue)
}
.tabViewStyle(.page(indexDisplayMode: .always))
.introspectPagedTabView { ( _, scrollView) in
scrollView.gestureRecognizers?.removeAll()
}
}
}
I tried also to introspect the scroll view, but same problem in iOS 15:
struct ContentView: View {
var body: some View {
TabView {
Text("Page 1").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red)
Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue)
}
.tabViewStyle(.page(indexDisplayMode: .always))
.introspect(.scrollView, on: .iOS(.v14, .v15, .v16, .v17)) {
print(type(of: $0)) // UICollectionView
$0..gestureRecognizers?.removeAll()
}
}
}
Thank You for help
Zoltan
Checklist
- I have read the README before submitting this report.
- This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working