aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Session/UserInformationView.swift
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-25 22:02:51 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-25 22:02:51 -0600
commit136e4ebe289e286b62c8e37bcd512de6df0de0d3 (patch)
tree894ce7d172a39b0a7c99e19e9b4d25064549529a /iosApp/iosApp/Session/UserInformationView.swift
parentef7a88961841752cb1a38a39f5e0cc298b463f56 (diff)
parent70141fe10227ef4eca2ef7ae4b2b9d7c8fac5675 (diff)
downloadetbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.tar.gz
etbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.tar.bz2
etbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.zip
Merge branch 'main' into ios_reports
Diffstat (limited to 'iosApp/iosApp/Session/UserInformationView.swift')
-rw-r--r--iosApp/iosApp/Session/UserInformationView.swift50
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()
+ }
+ }
+ }
+ }
+ }
+}