-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpacers.swift
60 lines (53 loc) · 1.49 KB
/
Spacers.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
53
54
55
56
57
58
59
60
import SwiftUI
struct Spacers: View {
var body: some View {
// HStack(spacing: 0) {
// Spacer()
// .frame(height: 10)
// .background(.orange)
//
// Rectangle()
// .frame(width: 50, height: 50)
//
// Spacer()
// .frame(height: 10)
// .background(.orange)
//
// Rectangle()
// .fill(.red)
// .frame(width: 50, height: 50)
//
// Spacer()
// .frame(height: 10)
// .background(.orange)
//
// Rectangle()
// .fill(.green)
// .frame(width: 50, height: 50)
//
// // Disappear when being pushed
// Spacer(minLength: 0)
// .frame(height: 10)
// .background(.orange)
// }
// .padding(.horizontal, 200)
// .background(Color.indigo)
VStack {
HStack(spacing: 0) {
Image(systemName: "xmark")
Spacer()
.frame(height: 10)
.background(.orange)
Image(systemName: "gear")
}
.font(.title)
.padding(.horizontal)
Spacer()
.frame(width: 10)
.background(.orange)
}
}
}
#Preview {
Spacers()
}