You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a view with a horizontal DragGesture. The ScrollView that my view is contained within ignores scroll up/down gestures. This behavior is new in iOS 18 (I have tested dev betas 4 & 5). Example code:
import SwiftUI
structContentView:View{varbody:someView{ScrollView{ForEach(0..<20){ n inTileView(color: n %2==0 ? .red :.blue)}}}}structTileView:View{@GestureStatevardragState:CGFloat=.zero
letcolor:Colorvarbody:someView{
color
.frame(height:100).gesture(DragGesture(
minimumDistance:10,
coordinateSpace:.global
).updating($dragState){ value, state, _ in
state = value.translation.width
}).offset(x: dragState)}}
See attached video of the above script running on iOS 17.5 (left) and iOS 18 dev beta 5 (right).
In the above example, the scroll gesture is always ignored. In my actual app, scroll gestures are only sometimes ignored.
Built using Xcode beta 5, happens on a sim (22A5326g) and on my physical device (22A5326f).
Files
Screen.Recording.2024-08-06.at.21.46.09.mov
The text was updated successfully, but these errors were encountered:
Description
I have a view with a horizontal
DragGesture
. TheScrollView
that my view is contained within ignores scroll up/down gestures. This behavior is new in iOS 18 (I have tested dev betas 4 & 5). Example code:See attached video of the above script running on iOS 17.5 (left) and iOS 18 dev beta 5 (right).
In the above example, the scroll gesture is always ignored. In my actual app, scroll gestures are only sometimes ignored.
Built using Xcode beta 5, happens on a sim (22A5326g) and on my physical device (22A5326f).
Files
Screen.Recording.2024-08-06.at.21.46.09.mov
The text was updated successfully, but these errors were encountered: