SwiftUI: Difference between revisions
Jump to navigation
Jump to search
Line 72: | Line 72: | ||
* [https://stackoverflow.com/questions/57799548 Navigation Link] | * [https://stackoverflow.com/questions/57799548 Navigation Link] | ||
* [https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-published-property-wrapper <code>@Published</code>] | * [https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-published-property-wrapper <code>@Published</code>] | ||
* [https://stackoverflow.com/questions/56479674 Toggle Style] | |||
* [https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-binding-property-wrapper <code>@Binding</code>] | * [https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-binding-property-wrapper <code>@Binding</code>] | ||
* [https://www.hackingwithswift.com/quick-start/swiftui/how-to-position-views-in-a-grid Grid View] | * [https://www.hackingwithswift.com/quick-start/swiftui/how-to-position-views-in-a-grid Grid View] | ||
|} | |} |
Revision as of 01:59, 15 January 2020
ContentView
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(alignment: .leading) {
Text("Turtle Rock")
.font(.title)
HStack {
Text("Joshua Tree National Park")
.font(.subheadline)
Spacer()
Text("California")
.font(.subheadline)
}
}
.padding()
}
}
struct ContentView_Preview: PreviewProvider {
static var previews: some View {
ContentView()
}
}