Created
May 17, 2020 22:44
-
-
Save jordansinger/932aa3fa46e32fcbbeeb910124533329 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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