SwiftUI: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 29: Line 29:
==References==
==References==
* [https://developer.apple.com/tutorials/swiftui/animating-views-and-transitions Add Animations to Individual Views]
* [https://developer.apple.com/tutorials/swiftui/animating-views-and-transitions Add Animations to Individual Views]
* [https://developer.apple.com/tutorials/swiftui/composing-complex-interfaces Composing Complex Interfaces]
* [https://developer.apple.com/tutorials/swiftui/creating-and-combining-views Creating and Combining Views]
* [https://developer.apple.com/tutorials/swiftui/creating-and-combining-views Creating and Combining Views]
* [https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation  Building Lists and Navigation]
* [https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation  Building Lists and Navigation]

Revision as of 02:22, 15 December 2019

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()
    }
}

References