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 | 29 | 30 | 31 |
Tags
- Xcode
- 리펙토링
- uiscrollview
- 리팩토링
- 애니메이션
- collectionview
- map
- scrollview
- clean architecture
- Protocol
- Observable
- combine
- UICollectionView
- ios
- MVVM
- 스위프트
- Clean Code
- UITextView
- swift documentation
- Human interface guide
- HIG
- 클린 코드
- swiftUI
- SWIFT
- tableView
- RxCocoa
- Refactoring
- uitableview
- rxswift
- ribs
Archives
- Today
- Total
목록2025/05/28 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] 제네릭과 프로토콜 적절히 사용하는 방법 (프로토콜보다 제네릭이 좋은 점)
제네릭과 프로토콜제네릭컴파일 타임에 타입이 정의되므로 타입 안정성이 있고 성능이 높음(static dispatch)DI(Dependency Injection)에 취약함struct UserService { var items: [T] func firstItem() -> T? { return items.first }}프로토콜DI(Dependency Injection)에 유리함 (관련 글)dynamic dispatch이므로 성능이 안좋음struct UserService { var items: [UserRepresentable] func firstItem() -> UserRepresentable? { items.first }}static dispatch, ..
iOS 응용 (swift)
2025. 5. 28. 01:08
