일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- xcode로 날씨앱 만들기
- MKMapItem
- Protocol
- 클로저의 캡슐화
- UIAlertAction
- font book
- 단일 책임원칙
- 러닝타이머
- CoreLocation
- swift
- AnyObject
- 서체관리자
- 한국어 개인정보처리방침
- 영문 개인정보처리방침
- weak var
- CLLocationManagerDelegate
- Startign Assignments
- RunningTimer
- WeatherManager
- addannotation
- Required Reason API
- weatherKit
- SwiftUI Boolean 값
- UICollectionViewFlowLayout
- App Store Connect
- dispatchsource
- Xcode
- 러닝기록앱
- MKMapViewDelegate
- Timer
- Today
- Total
VesselWheel
NavigationView with section in Form{} 본문
import SwiftUI
struct ContentView: View {
@State private var username: String = ""
@State private var isPrivate: Bool = true
@State private var notifications: Bool = false
@State private var previewIndex = 0
let previewOptions: Array<String> = ["Always", "When Unlocked", "Never"]
var body: some View {
/*
Form{
TextField("Username", text: self.$username)
Toggle(isOn: self.$isPrivate){
Text("Private Account")
}
}*/
NavigationView{
Form{
Section(header: Text("PROFILE")){
TextField("Username", text: self.$username)
Toggle(isOn: self.$isPrivate){
Text("Private Account")
}
}
Section(header: Text("NOTIFICATIONS")){
Toggle(isOn: self.$notifications){
Text("Enabled")
}
Picker(selection: self.$previewIndex, label: Text("Show Previews")){
ForEach(0..<previewOptions.count){ index in
Text(self.previewOptions[index])
}
}
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
'Xcode Study' 카테고리의 다른 글
Xcode 자동 들여쓰기 //Re-Intent(Ctl + i or cmd ][ ) (0) | 2023.10.19 |
---|---|
cocoa pods 사용법과 터미널 내용 (1) | 2023.10.18 |
count : index with VStack (0) | 2023.10.18 |
NavigationView (0) | 2023.10.18 |
단추 늘이기, 줄이기 (0) | 2023.10.18 |