From 4b24048477b2d667d43c90bc8e4898fc800505d7 Mon Sep 17 00:00:00 2001 From: "severin.memmishofer" Date: Wed, 12 Jul 2023 10:19:43 +0200 Subject: [PATCH] Fixed some graphical Issues, like the toolbar labels and the navigation title --- RippleChat/ContentView.swift | 12 ++++-- RippleChat/Views/SettingsView.swift | 67 +++++++++++++++-------------- 2 files changed, 42 insertions(+), 37 deletions(-) diff --git a/RippleChat/ContentView.swift b/RippleChat/ContentView.swift index 1667f54..2f33fa7 100644 --- a/RippleChat/ContentView.swift +++ b/RippleChat/ContentView.swift @@ -30,11 +30,13 @@ struct ContentView: View { .environmentObject(dataStore) } HStack { + Spacer() Button(action: { self.currentView = 0 }) { VStack { - Label("Discovery", systemImage: "dot.radiowaves.left.and.right") + Image(systemName: "dot.radiowaves.left.and.right") + Text("Discovery") } } Spacer() @@ -42,7 +44,8 @@ struct ContentView: View { self.currentView = 1 }) { VStack { - Label("Feeds", systemImage: "person.2") + Image(systemName: "person.2") + Text("Feeds") } } Spacer() @@ -50,13 +53,14 @@ struct ContentView: View { self.currentView = 2 }) { VStack { - Label("Settings",systemImage: "gear") + Image(systemName: "gear") + Text("Settings") } } + Spacer() } .frame(height: UIScreen.main.bounds.height * 0.05) } - .padding() } diff --git a/RippleChat/Views/SettingsView.swift b/RippleChat/Views/SettingsView.swift index d050e3e..d191767 100644 --- a/RippleChat/Views/SettingsView.swift +++ b/RippleChat/Views/SettingsView.swift @@ -16,42 +16,43 @@ struct SettingsView: View { var body: some View { - - List { - Section(header: Text("Personal Feed ID")) { - Label(dataStore.personalID, systemImage: "person.crop.circle") - } - Section(header: Text("Friends")) { - ForEach(dataStore.friends) { friend in - Label(friend, systemImage: "person") + NavigationView { + List { + Section(header: Text("Personal Feed ID")) { + Label(dataStore.personalID, systemImage: "person.crop.circle") } - } - } - .navigationTitle("Settings") - .toolbar { - ToolbarItem(placement: .confirmationAction) { - Button("Edit") { - isPresentingEditView = true - } - } - } - .sheet(isPresented: $isPresentingEditView) { - NavigationStack { - SettingsEditView() - .navigationTitle("Settings") - .toolbar { - ToolbarItem(placement: .cancellationAction){ - Button("Cancel") { - isPresentingEditView = false - } - } - ToolbarItem(placement: .confirmationAction) { - Button("Done") { - isPresentingEditView = false - } - } + Section(header: Text("Friends")) { + ForEach(dataStore.friends) { friend in + Label(friend, systemImage: "person") } + } } + .navigationTitle("Settings") + .toolbar { + ToolbarItem(placement: .confirmationAction) { + Button("Edit") { + isPresentingEditView = true + } + } + } + .sheet(isPresented: $isPresentingEditView) { + NavigationStack { + SettingsEditView() + .navigationTitle("Settings") + .toolbar { + ToolbarItem(placement: .cancellationAction){ + Button("Cancel") { + isPresentingEditView = false + } + } + ToolbarItem(placement: .confirmationAction) { + Button("Done") { + isPresentingEditView = false + } + } + } + } + } } }