LongPressGesture (specifically .updating) is broken in iOS 18 SDK and since April 24 is the deadline after which all apps have to be built with 18 SDK, I'm faced with having to hack together my own gesture. Apple's own code in the docs is broken (https://developer.apple.com/documentation/swiftui/longpressgesture). Thinking I'll create my own UIGestureRecognizer with a timer and use UIGestureRecognizerRepresentable. #swift #swiftui
Hmm, the other thing I can do (which I've done before is use DragGesture(minimumDistance: 0) and use a timer with that. Although I'd rather encapsulate all the behavior in its own custom gesture. Decisions. #swiftui
@scottymac The issue has been finally fixed in iOS 18.4 beta.
@defagos Huzzah! Thanks for the update! I'm still on Sonoma, so I can't run Xcode 16.3 beta. Looks like I need to finally move to Sequoia.