일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Protocol
- addannotation
- RunningTimer
- CoreLocation
- 서체관리자
- UIAlertAction
- CLLocationManagerDelegate
- Required Reason API
- xcode로 날씨앱 만들기
- 러닝기록앱
- weak var
- MKMapViewDelegate
- MKMapItem
- weatherKit
- font book
- WeatherManager
- 러닝타이머
- SwiftUI Boolean 값
- AnyObject
- Xcode
- 영문 개인정보처리방침
- 한국어 개인정보처리방침
- Startign Assignments
- Timer
- swift
- 클로저의 캡슐화
- 단일 책임원칙
- UICollectionViewFlowLayout
- App Store Connect
- dispatchsource
- Today
- Total
VesselWheel
NavigationView 본문
// ContentView.swift
// ex11
//
// Created by tjoeun on 2023/04/15.
//
import SwiftUI
struct ContentView: View {
@State private var nameIdx = 0
var names = ["paul", "peter", "david", "james", "john"]
var body: some View {
VStack{
NavigationView{
Form{
Section{
Picker(selection: self.$nameIdx, label:
Text("Names")){
// ForEach(0 ..< names.count)
ForEach(0 ..< 5){ index in
Text(self.names[index]).tag(index)
}
}.pickerStyle(SegmentedPickerStyle())
}
}.navigationBarTitle(Text("Names"))
}
Text("Picker Selection: \(nameIdx)")
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
'Xcode Study' 카테고리의 다른 글
NavigationView with section in Form{} (0) | 2023.10.18 |
---|---|
count : index with VStack (0) | 2023.10.18 |
단추 늘이기, 줄이기 (0) | 2023.10.18 |
func Count and Age present (0) | 2023.10.18 |
e-mail / pw 입력창 (1) | 2023.10.18 |