SwiftUI: Difference between revisions
Jump to navigation
Jump to search
Line 67: | Line 67: | ||
| valign="top" | | | valign="top" | | ||
* [https://www.hackingwithswift.com/quick-start/swiftui/how-to-use-observedobject-to-manage-state-from-external-objects <code>@ObservedObject</code>] | * [https://www.hackingwithswift.com/quick-start/swiftui/how-to-use-observedobject-to-manage-state-from-external-objects <code>@ObservedObject</code>] | ||
* [https://www.hackingwithswift.com/quick-start/swiftui/understanding-property-wrappers-in-swift-and-swiftui Property Wrappers] | |||
* [https://stackoverflow.com/questions/57063142 Status Bar Color] | * [https://stackoverflow.com/questions/57063142 Status Bar Color] | ||
* [https://stackoverflow.com/questions/57799548 Navigation Link] | * [https://stackoverflow.com/questions/57799548 Navigation Link] |
Revision as of 22:48, 14 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()
}
}