Michael Long
1 min readJul 9, 2019

--

Actually, doing a Settings-style screen is what it does best.

struct SettingsForm : View {
var body: some View {
NavigationView {
Form { item in
NavigationLink(destination: Settings1()) {
Text("Settings 1")
}
NavigationLink(destination: Settings2()) {
Text("Settings 2")
}
NavigationLink(destination: Settings3()) {
Text("Settings 3")
}
NavigationLink(destination: Settings4()) {
Text("Settings 4")
}
}
.navigationBarTitle("NavigationLink")
}
}
}

There’s a lot less code here than trying to make a VC and wiring up a tableview.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)