NEULiee / iOS-App-Dev-Tutorials

Apple 개발자 홈페이지의 UIKit 튜토리얼을 보고 정리하는 repository 입니다.
0 stars 0 forks source link

1. SwiftUI Essentials #11

Open NEULiee opened 2 years ago

NEULiee commented 2 years ago

https://developer.apple.com/tutorials/swiftui

NEULiee commented 2 years ago

Creating and Combining Views

좋아하는 장소를 발견하고 공유하기 위한 앱인 Landmarks 앱을 제작합니다. 뷰에 지도를 포함하기 위해 MapKit을 포함합니다. 뷰의 디자인을 다듬을 때 Xcode가 실시간으로 피드백을 제공합니다. (Canvas)

Section 1. Create a New Project and Explore the Canvas

Learned

@main
struct LandmarksApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}


import SwiftUI

// View의 content 및 layout
struct ContentView: View {
    var body: some View {
        Text("Hello, world!")
            .padding()
    }
}

// preview
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

Section 2. Customize the Text View

Learned

Section 3. Combine Views Using Stacks

Learned

image

Section 4. Create a Custom Image View

Section 5. Use SwiftUI Views From Other Frameworks