SwiftUI: Difference between revisions
Jump to navigation
Jump to search
Line 85: | Line 85: | ||
* [https://stackoverflow.com/questions/56631892 Add a SwiftUI View to UIKit] | * [https://stackoverflow.com/questions/56631892 Add a SwiftUI View to UIKit] | ||
* [https://swiftwithmajid.com/2020/01/15/the-magic-of-view-preferences-in-swiftui/ SwiftUI Preferences] | * [https://swiftwithmajid.com/2020/01/15/the-magic-of-view-preferences-in-swiftui/ SwiftUI Preferences] | ||
* [https://jinxiansen.github.io/SwiftUI/ SwiftUI Example] | |||
* [https://www.hackingwithswift.com/quick-start/swiftui/how-to-show-a-context-menu Context Menu] | * [https://www.hackingwithswift.com/quick-start/swiftui/how-to-show-a-context-menu Context Menu] | ||
* [https://stackoverflow.com/questions/58580027 Radio Group] | * [https://stackoverflow.com/questions/58580027 Radio Group] |
Revision as of 20:09, 2 February 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()
}
}