We will start a drawing app by creating and altering shapes using gestures. Gestures in SwiftUI are a little bit different than their UIKit counterpart. We will have to deal with challenges when supporting different gestures on the same View.
Chapters:
0:00 Using Gestures in SwiftUI
0:26 Creating Draw App
0:42 Adding Tap Gesture to the Canvas View
2:56 Making views Draggable with DragGesture
5:18 Creating Rectangle and Square Shapes
7:46 Creating Custom Triangle Shape
9:34 Scaling Shapes with MagnificationGesture
12:55 Combining SwiftUI Gestures
16:15 Using a UIGestureRecognizer in SwiftUI Views
19:35 Animating the removal of shapes with Transition
Source code: [ Ссылка ]
Draw - SwiftUI playlist: [ Ссылка ]-
Intro song: All That from Bensound.com
Outro song: Endless Motion from Bensound.com
Ещё видео!