diff options
Diffstat (limited to 'iosApp/iosApp/Session/UserInformationView.swift')
-rw-r--r-- | iosApp/iosApp/Session/UserInformationView.swift | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/iosApp/iosApp/Session/UserInformationView.swift b/iosApp/iosApp/Session/UserInformationView.swift new file mode 100644 index 0000000..98d4bfd --- /dev/null +++ b/iosApp/iosApp/Session/UserInformationView.swift @@ -0,0 +1,50 @@ +// +// UserInformationView.swift +// iosApp +// +// Created by Iván on 15/02/22. +// Copyright © 2022 orgName. All rights reserved. +// + +import SwiftUI + +struct UserInformationView: View { + @Environment(\.presentationMode) var presentationMode + @State var action = Action.account + + enum Action { + case account + case about + } + + var body: some View { + NavigationView { + VStack { + switch action { + case .account: + AccountView() + case .about: + AboutView() + } + } + .navigationBarTitleView( + Picker(selection: $action) { + Text("account").tag(Action.account) + Text("about").tag(Action.about) + } label: { + EmptyView() + }.pickerStyle(SegmentedPickerStyle()) + ) + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button { + presentationMode.wrappedValue.dismiss() + } label: { + Text("done").bold() + } + } + } + } + } +} |