Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Gestures prevent scrolling with iOS 18
I also have a similar issue. I'm pretty new to swift so there might be some messy code private var mediaGridView: some View { ScrollView { RefreshControl(coordinateSpace: .named("refresh")) { //some code here } LazyVGrid(columns: gridColumns) { //some code here } .padding(.horizontal, 2) .coordinateSpace(name: "grid") .onPreferenceChange(ItemBoundsPreferenceKey.self) { //some code here } .gesture( DragGesture(minimumDistance: 0) .onChanged { gesture in if isSelectionMode { let location = gesture.location if !isDragging { startDragging(at: location, in: itemBounds) } updateSelection(at: location, in: itemBounds) } } .onEnded { _ in endDragging() } ) } .coordinateSpace(name: "refresh") } First I catched the issue on an iPhone 11 test device. iPhone 11 on simulator with ios 18 also have this problem while 17.5 simulator won't. If I change .gesture() to .simultaneousGesture() vertical scrolling starts to work again but now scroll also works while dragging my finger so everything on the screen starts to dance. Weirdly, the simulator for iPhone 14 Pro Max with iOS 18.2 doesn’t have this issue, but the real device does. Hope somebody can figure this.
14h