SwiftUI: Difference between revisions
Jump to navigation
Jump to search
Line 80: | Line 80: | ||
{| | {| | ||
| valign="top" | | | valign="top" | | ||
* [https://stackoverflow.com/questions/56819063 UIHostingController inside an UIView] | |||
* [https://medium.com/better-programming/using-the-preferencekey-protocol-to-align-views-7f3ae32f60fc Using the PreferenceKey Protocol] | * [https://medium.com/better-programming/using-the-preferencekey-protocol-to-align-views-7f3ae32f60fc Using the PreferenceKey Protocol] | ||
* [https://www.raywenderlich.com/4503153-how-to-create-a-splash-screen-with-swiftui Splash Screen With SwiftUI] | * [https://www.raywenderlich.com/4503153-how-to-create-a-splash-screen-with-swiftui Splash Screen With SwiftUI] |
Revision as of 03:35, 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()
}
}