When the user performs a LongPressGesture on a Shape, we will present an ActionSheet with custom actions. We will display the option to remove the shape or change its color using ColorPicker.
Chapters:
0:00 Using LongPress Gesture and ColorPicker
0:28 Adding onLongPressGesture
1:28 Presenting ActionSheet
3:32 Creating ShapeWrapper to get rid of AnyView
4:28 Using a @Published var in CanvasViewModel
7:24 Making ShapeWrapper Identifiable and using it on ForEach
10:06 Choosing a Color with ColorPicker
12:05 Presenting ColorPicker control
Source code: https://github.com/codingWithTom/Draw...
Draw - SwiftUI playlist: • Draw - SwiftUI
Intro song: All That from Bensound.com
Outro song: Endless Motion from Bensound.com