애플 정책상으로 Launch Screen에 코드를 작성 할 수 없기때문에 다른 뷰에 로딩화면을 연출하여 launch screen처럼 동작하는걸로 보이게 한다.
Launch Screen constraints
iOS15부터 사용가능 숫자 날자 시간 등의 데이터를 localized string 변환
함수들의 정확한 반환타입 확인하면서 사용할것
let wordListIterable = InternetSlang.allCases //CaseIterable
print(wordListIterable)
https://github.com/WenchaoD/FSCalendar
https://github.com/raulriera/TextFieldEffects
https://github.com/onevcat/Kingfisher
https://github.com/hackiftekhar/IQKeyboardManager
enum TextFieldType: Int{
case id = 100,email = 200,password = 300
}
@IBAction func textFieldKeyboardTapped(_ sender: UITextField) {
//가드 여러개쓰기
guard let text = sender.text, let value = TextFieldType(rawValue: sender.tag) else{
//알러트로 대응
print("text empty")
return
}
switch value {
case .email:
print("email \(text)")
case .id:
print("id \(text)")
case.password:
print("password \(text)")
}
}
override func attack() {
super.attack() //parent class
print("boss attacks")
}
// super.function()을 통해서 상속받은 부모의 기능도 동시에 실행을 하는것.
// override func viewDidLoad){
// super.viewDidLoad()
// print("my viewdidload")
// }
//
Swift) 초기화(Initializers) 이해하기 (3/6) - Initializer Delegation
Static: 모두가 같은 화면
설정
Dynamic: 틀은 같지만 내용이 다른화면. 대부분 이 형태를 사용하게 됨
유투브 추천
카카오톡 목록
Header - 배너 등으로 사용
인스타 스토리
Footer
스타일: Plain, Grouped, InsetGrouped (최신)
Section (section,row)
Row
//3가지 필수
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
<#code#>
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
<#code#>
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
<#code#>
}
cell 을 여러개 만들어놓고 조건문에 따라 변경해서 씀
let cell = tableView.dequeueReusableCell(withIdentifier: settingCell)
Tableview Content 를 dynamic prototype으로 해야 tableview.dequereusablecell(identifier:)이 가능한것 같다. Content 를 Static Cell로 할 경우 위 함수로 tabelcell 생성이 안되는것 같음
You set the table style when you initialize the table view (see init(frame:style:)
). You can’t modify the style thereafter.
Sandbox
DataContainer
Documents - dev, user both accessible
Library
Temp
System
공통적으로 쓰이는 뷰들에 대하여 익스텐션을 추가해서 효율성 높이기
셀 선택후 클래스 지정
Custom TableView Cell
Static = stored type property(acts like lazy) / type method
Lazy = lazy type property
좋은 글 감사합니다.