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 |
Tags
- Protocol
- 리팩토링
- uitableview
- map
- 애니메이션
- collectionview
- clean architecture
- Refactoring
- swift documentation
- swiftUI
- 스위프트
- uiscrollview
- Xcode
- MVVM
- Observable
- HIG
- combine
- UITextView
- Human interface guide
- 리펙토링
- Clean Code
- UICollectionView
- rxswift
- 리펙터링
- SWIFT
- ribs
- ios
- 클린 코드
- tableView
- RxCocoa
Archives
- Today
- Total
목록BehaviorRelay (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] MVVM패턴을 이용하여 toggle 로직 구현
MVVM에서 RxSwift와 computed property 활용한 방법 안좋은 방법의 예시 ViewModel에서 UIKit접근하는 형태 toogle변수를 아래와같이 따로 두지 않고, BehaviorRelay하나로 해결가능 // View Model let updateImage = PublishRelay() var selectedAppleButton: Bool = true { willSet(newValue) { if newValue { updateImage.setImage(UIImage(named: "slectpoint"), for: .normal) } else { updateImage.setImage(UIImage(named: "slectedpoint"), for: .normal) } } } func t..
iOS 실전 (swift)
2020. 11. 1. 22:18