-
Notifications
You must be signed in to change notification settings - Fork 3
/
ContentView.swift
43 lines (39 loc) · 995 Bytes
/
ContentView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// ContentView.swift
// P17C Flashzilla
//
// Created by Julian Moorhouse on 06/05/2021.
//
import SwiftUI
struct ContentView: View {
@State private var currentAmount: Angle = .degrees(0)
@State private var finalAmount: Angle = .degrees(0)
var body: some View {
VStack {
Text("Hello, World!")
.onTapGesture {
// The child gesture is given priority
print("Text tapped")
}
}
// .onTapGesture {
// print("VStack tapped")
// }
// --
// unless you use highPriorityGesture
//.highPriorityGesture(
// --
// This will allow both to run
.simultaneousGesture(
TapGesture()
.onEnded { _ in
print("VStack tapped")
}
)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}