-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenuExampleView.swift
53 lines (41 loc) · 1.27 KB
/
MenuExampleView.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
44
45
46
47
48
49
50
51
52
//
// MenuExampleView.swift
// SwiftUIForDesigners
//
// Created by paige shin on 2023/06/03.
//
import SwiftUI
struct MenuExampleView: View {
var body: some View {
NavigationStack {
VStack {
Text("SwiftUI Menu")
} //: VSTACK
.padding()
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Menu {
Button(role: .destructive) {
} label: {
Text("Delete Tweet")
Image(systemName: "trash")
}
Button {
} label: {
Text("Pin to profile")
Image(systemName: "pin")
}
} label: {
Image(systemName: "ellipsis")
.foregroundColor(Color(.systemGray))
}
}
}
} //: STACK
}
}
struct MenuExampleView_Previews: PreviewProvider {
static var previews: some View {
MenuExampleView()
}
}