@@ -27,12 +27,12 @@ struct Home: View {
27
27
. frame ( minWidth: 0 , maxWidth: 712 )
28
28
. cornerRadius ( 30 )
29
29
. shadow ( radius: 20 )
30
- . animation ( . fluidSpring ( ) )
30
+ . animation ( . spring ( ) )
31
31
. offset ( y: showProfile ? statusBarHeight + 40 : UIScreen . main. bounds. height)
32
32
33
33
MenuButton ( show: $show)
34
34
. offset ( x: - 40 , y: showProfile ? statusBarHeight : 80 )
35
- . animation ( . fluidSpring ( ) )
35
+ . animation ( . spring ( ) )
36
36
37
37
MenuRight ( show: $showProfile)
38
38
. offset ( x: - 16 , y: showProfile ? statusBarHeight : 88 )
@@ -66,7 +66,7 @@ struct MenuRow: View {
66
66
67
67
Text ( text)
68
68
. font ( . headline)
69
- . color ( . primary)
69
+ . foregroundColor ( . primary)
70
70
71
71
Spacer ( )
72
72
}
@@ -91,14 +91,16 @@ struct MenuView: View {
91
91
92
92
var menu = menuData
93
93
@Binding var show : Bool
94
+ @State var showSettings = false
94
95
95
96
var body : some View {
96
97
return HStack {
97
98
VStack ( alignment: . leading) {
98
99
ForEach ( menu) { item in
99
100
if item. title == " Settings " {
100
- PresentationLink ( destination : Settings ( ) ) {
101
+ Button ( action : { self . showSettings . toggle ( ) } ) {
101
102
MenuRow ( image: item. icon, text: item. title)
103
+ . sheet ( isPresented: self . $showSettings) { Settings ( ) }
102
104
}
103
105
} else {
104
106
MenuRow ( image: item. icon, text: item. title)
@@ -114,7 +116,7 @@ struct MenuView: View {
114
116
. padding ( . trailing, 60 )
115
117
. shadow ( radius: 20 )
116
118
. rotation3DEffect ( Angle ( degrees: show ? 0 : 60 ) , axis: ( x: 0 , y: 10.0 , z: 0 ) )
117
- . animation ( . basic ( ) )
119
+ . animation ( . default )
118
120
. offset ( x: show ? 0 : - UIScreen. main. bounds. width)
119
121
. tapAction {
120
122
self . show. toggle ( )
@@ -167,15 +169,17 @@ struct MenuButton: View {
167
169
struct MenuRight : View {
168
170
169
171
@Binding var show : Bool
172
+ @State var showUpdate = false
170
173
171
174
var body : some View {
172
175
return ZStack ( alignment: . topTrailing) {
173
176
HStack {
174
177
Button ( action: { self . show. toggle ( ) } ) {
175
178
CircleButton ( icon: " person.crop.circle " )
176
179
}
177
- PresentationLink ( destination : UpdateList ( ) ) {
180
+ Button ( action : { self . showUpdate . toggle ( ) } ) {
178
181
CircleButton ( icon: " bell " )
182
+ . sheet ( isPresented: self . $showUpdate) { UpdateList ( ) }
179
183
}
180
184
}
181
185
Spacer ( )
0 commit comments