Fixing position of settings icon within InitView.
@@ -7,10 +7,13 @@ struct InitView : MVIView {
var body: some View {
mvi { model, intent in
- VStack {
+ ZStack {
+
+ // ZStack: layer 0 (background)
+ // Position the settings icon in top-right corner.
HStack{
Spacer()
-
+ VStack {
NavigationLink(destination: ConfigurationView()) {
Image(systemName: "gearshape")
.imageScale(.large)
@@ -24,10 +27,13 @@ struct InitView : MVIView {
RoundedRectangle(cornerRadius: 16)
.stroke(Color.appHorizon, lineWidth: 2)
)
-
+ Spacer()
}
.padding(.all, 16)
- .padding(.bottom, 150)
+ }
+
+ // ZStack: layer 1 (foreground)
+ VStack {
Image("logo_flat")
.resizable()
@@ -89,14 +95,16 @@ struct InitView : MVIView {
)
.padding([.top, .bottom], 0)
- }
+ } // </VStack>
.padding(.top, keyWindow?.safeAreaInsets.top)
.padding(.bottom, keyWindow?.safeAreaInsets.bottom)
.frame(maxWidth: .infinity, maxHeight: .infinity)
- .offset(x: 0, y: -80) // move center upwards
+ .offset(x: 0, y: -40) // move center upwards; focus is buttons, not logo
.edgesIgnoringSafeArea(.all)
.navigationBarTitle("", displayMode: .inline)
.navigationBarHidden(true)
+
+ } // </ZStack>
}
}
}
