Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ios
- UICollectionView
- Protocol
- 클린 코드
- 리팩토링
- UITextView
- MVVM
- 스위프트
- tableView
- swift documentation
- 리펙토링
- Clean Code
- 애니메이션
- map
- swiftUI
- rxswift
- RxCocoa
- collectionview
- SWIFT
- Xcode
- 리펙터링
- clean architecture
- Observable
- HIG
- ribs
- uitableview
- combine
- Refactoring
- uiscrollview
- Human interface guide
Archives
- Today
- Total
목록guard문 사용 시 주의사항 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] guard문 잘 사용하기 (#guard문 사용 시 주의사항, #이중부정, #2중부정)
guard문을 사용하여 과도한 들여쓰기 막기 guard문은 다른 언어에 거의 없고 swift언어에만 있는 문법 guard문의 의미는 코드의 흐름에서 막아야 하는 조건이라는 의미 guard를 사용하면 과도한 들여쓰기를 막고 읽기 쉽게 표현이 가능 ex) guard문 쓰기 전 func processUserInput(_ input: String?) { if let unwrappedInput = input { if unwrappedInput.count > 0 { if let intValue = Int(unwrappedInput) { if intValue >= 0 { print("입력한 값 > 양수") } else { print("입력한 값 > 음수") } } else { print("입력한 값 > 정수 x") ..
Refactoring (리펙토링)
2023. 10. 31. 01:08