SwiftUI: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 119: Line 119:
| valign="top" |
| valign="top" |
* [https://www.hackingwithswift.com/quick-start/swiftui/whats-the-difference-between-observedobject-state-and-environmentobject <code>@ObservedObject</code>,  <code>@State</code> vs. <code>@EnvironmentObject</code>]
* [https://www.hackingwithswift.com/quick-start/swiftui/whats-the-difference-between-observedobject-state-and-environmentobject <code>@ObservedObject</code>,  <code>@State</code> vs. <code>@EnvironmentObject</code>]
* [https://stackoverflow.com/questions/54971163 Set environment variable <code>CG_PDF_VERBOSE</code>]
* [https://stackoverflow.com/questions/748175 Asynchronous vs Synchronous]
* [https://stackoverflow.com/questions/748175 Asynchronous vs Synchronous]
* [https://github.com/Dalodd/Alamofire-Synchronous Alamofire Synchronous]
* [https://github.com/Dalodd/Alamofire-Synchronous Alamofire Synchronous]


|}
|}

Revision as of 07:05, 11 April 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()
    }
}

References