Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit d17c88b

Browse files
authored
Add custom titles to navigation bars in tabs
1 parent 3e82905 commit d17c88b

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

Sources/prosign/prosign.swift

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,48 @@ struct ProSign: App {
1212
struct MainTabView: View {
1313
var body: some View {
1414
TabView {
15+
// ---- Signer Tab ----
1516
NavigationStack {
1617
SignerView()
17-
.navigationTitle("ProSign - Signer")
1818
.navigationBarTitleDisplayMode(.inline)
19+
.toolbar {
20+
ToolbarItem(placement: .principal) {
21+
Text("ProSign - Signer")
22+
.font(.headline)
23+
}
24+
}
1925
}
2026
.tabItem {
2127
Image(systemName: "hammer")
2228
Text("Signer")
2329
}
30+
31+
// ---- Certificates Tab ----
2432
NavigationStack {
2533
CertificateView()
34+
.navigationBarTitleDisplayMode(.inline)
35+
.toolbar {
36+
ToolbarItem(placement: .principal) {
37+
Text("ProSign - Certificates")
38+
.font(.headline)
39+
}
40+
}
2641
}
2742
.tabItem {
2843
Image(systemName: "key")
2944
Text("Certificates")
3045
}
3146

47+
// ---- About Tab ----
3248
NavigationStack {
3349
AboutView()
50+
.navigationBarTitleDisplayMode(.inline)
51+
.toolbar {
52+
ToolbarItem(placement: .principal) {
53+
Text("ProSign - About")
54+
.font(.headline)
55+
}
56+
}
3457
}
3558
.tabItem {
3659
Image(systemName: "info.circle")

0 commit comments

Comments
 (0)