Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Gestures prevent scrolling with iOS 18
Same problem in my app. I develop a comic read app, use UIPageViewController as basic reader. And I add a clear layer with tap gesture, when user tap center area, will open a control panel to adjust reading preference. But now I can't scroll UIPageViewController by swipe gesture. here is a simple version of my code: struct TestFunctionView: View { var body: some View { ZStack { TabView { Text("1") Text("2") } .tabViewStyle(.page) Rectangle() .foregroundColor(.clear) .contentShape(Rectangle()) .onTapGesture(count: 1){ print("Tap") } } } } In iOS 17, both tap and scroll gesture can be trigger. but in iOS 18, it's not. Really help apple can fix it, or it there another way to code my requirement?
Sep ’24