Post

Replies

Boosts

Views

Activity

Reply to SwiftUI - Using the Drag and Magnification Gestures Sequenced
It is not working like I expected but as I recreate it to test, here is the DragState for you. enum DragState { case inactive case pressing case dragging(translation: CGSize) var isPressing: Bool { guard case .pressing = self else { return false } return true } var translation: CGSize { guard case .dragging(let size) = self else { return .zero } return size } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’24