Skip to content

Instantly share code, notes, and snippets.

@jordansinger
Created May 17, 2020 22:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordansinger/932aa3fa46e32fcbbeeb910124533329 to your computer and use it in GitHub Desktop.
Save jordansinger/932aa3fa46e32fcbbeeb910124533329 to your computer and use it in GitHub Desktop.
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
NavigationView {
List {
Section {
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "airplane").font(.callout)
}.frame(width: 28, height: 28).background(Color.orange).cornerRadius(6)
Text("Airplane Mode")
}
}
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "wifi").font(.callout)
}.frame(width: 28, height: 28).background(Color.blue).cornerRadius(6)
Text("Wi-Fi")
}
}
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "wifi").font(.callout)
}.frame(width: 28, height: 28).background(Color.blue).cornerRadius(6)
Text("Bluetooth")
}
}
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "phone.fill").font(.callout)
}.frame(width: 28, height: 28).background(Color.green).cornerRadius(6)
Text("Cellular")
}
}
}
Section {
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "app.badge").font(.callout)
}.frame(width: 28, height: 28).background(Color.red).cornerRadius(6)
Text("Notifications")
}
}
NavigationLink(destination: Text("Detail View")) {
HStack {
ZStack {
Image(systemName: "gear").font(.callout)
}.frame(width: 28, height: 28).background(Color.gray).cornerRadius(6)
Text("General")
}
}
}
}
.navigationBarTitle("Title")
.listStyle(GroupedListStyle())
}
.navigationViewStyle(StackNavigationViewStyle())
}
}
PlaygroundPage.current.setLiveView(Screen())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment