Skip to content
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

Removing gesture recognizers is not working in iOS 15 #410

Open
2 tasks done
zoltanbognar opened this issue Apr 10, 2024 · 0 comments
Open
2 tasks done

Removing gesture recognizers is not working in iOS 15 #410

zoltanbognar opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zoltanbognar
Copy link

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

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

@zoltanbognar zoltanbognar added the bug Something isn't working label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant