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
- tableView
- MVVM
- swift documentation
- 클린 코드
- ribs
- Refactoring
- rxswift
- ios
- uiscrollview
- combine
- SWIFT
- UICollectionView
- Observable
- Human interface guide
- uitableview
- 리팩토링
- 스위프트
- UITextView
- map
- RxCocoa
- scrollview
- Clean Code
- HIG
- Protocol
- collectionview
- swiftUI
- 애니메이션
- clean architecture
- Xcode
- 리펙토링
Archives
- Today
- Total
목록rethrows (1)
김종권의 iOS 앱 개발 알아가기
throws 함수 내부에서 오류를 밖으로 던지고, 사용하는 쪽에서 그 오류를 처리할 때 사용하는 키워드 throws키워드는 함수 시그니처의 반환 전 화살표 좌측에 사용 enum MyError: Error { case negativeValue } func plus(one: Int, two: Int) throws -> Int { guard one < 0 && two < 0 else { throw MyError.negativeValue } return one + two } throws 처리 do { let value = try plus(one: -1, two: 2) print(value) } catch { print(error) } rethrows 파라미터로 전달받은 함수가 에러를 던질 때 사용 이름이 ret..
iOS 기본 (swift)
2022. 4. 15. 22:37