Skip to content

Instantly share code, notes, and snippets.

@0xWDG
Last active January 1, 2025 13:14
Show Gist options
  • Save 0xWDG/b7091b634020837c852f093bfb655af0 to your computer and use it in GitHub Desktop.
Save 0xWDG/b7091b634020837c852f093bfb655af0 to your computer and use it in GitHub Desktop.
iOS 18 navigation title. [FB16213616]
// ContentView.swift
// iWebTools
//
// Created by Wesley de Groot on 05/12/2024.
//
import SwiftUI
struct ContentView: View {
var body: some View {
TabView {
ToolsView()
.tabItem {
Image(systemName: "dot.scope")
Text("Check")
}
ToolsView()
.tabItem {
Image(systemName: "hammer")
Text("Tools")
}
ToolsView()
.tabItem {
Image(systemName: "info")
Text("About")
}
}
}
}
#Preview {
ContentView()
}
import SwiftUI
struct HTTPStatusCodes: View {
var body: some View {
List {
Text("test")
}
.searchable(text: $searchText)
.navigationTitle("HTTP Status Codes")
.navigationBarTitleDisplayMode(.inline)
}
}
import SwiftUI
struct ToolsView: View {
var body: some View {
NavigationStack {
List {
Section("HTTP") {
NavigationLink {
HTTPStatusCodes()
} label: {
Label(
"HTTP Status Codes",
systemImage: "doc.text.magnifyingglass"
)
}
}
}
}
}
}
//
// HomeView.swift
// iWebTools
//
// Created by Wesley de Groot on 05/12/2024.
//
import SwiftUI
struct ToolsView: View {
@State private var columnVisibility =
NavigationSplitViewVisibility.doubleColumn
var body: some View {
NavigationSplitView(columnVisibility: $columnVisibility) {
List {
Section("HTTP") {
NavigationLink {
HTTPStatusCodes()
} label: {
Label(
"HTTP Status Codes",
systemImage: "doc.text.magnifyingglass"
)
}
}
}
} details: {
Text("Please select a tool")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment