SwiftUI 연습

애플에서 제공하는 예제: https://developer.apple.com/tutorials/swiftui/creating-and-combining-views

Navigation View

NavigationView {
  Text("This is a great app")
    .navigationBarTitle("Welcome", displayMode: .inline)
}
NavigationView {
  Text("This is a great app")
    .navigationBarTitle("Welcome", displayMode: .large)
}
NavigationView {
  Text("This is a great app")
    .navigationBarTitle("Welcome", displayMode: .inline)
    .navigationBarItems(leading: Button(action: { print("prev clicked")},
                                        label: { Text("Prev")}),
                        trailing: Button(action: { print("next clicked")},
                                          label: { Text("Next")}))
}
NavigationView {
  Text("This is a great app")
    .navigationBarTitle("Welcome", displayMode: .inline)
    .navigationBarItems(leading: Button(action: { print("prev clicked")},
                                        label: { Text("Prev")}),
                        trailing: Button(action: { print("next clicked")},
                                          label: { Image(systemName: "airplayaudio")}))
}

system image 목록: https://sfsymbols.com