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
- rxswift
- 애니메이션
- 클린 코드
- Clean Code
- UITextView
- tableView
- ribs
- swiftUI
- HIG
- swift documentation
- collectionview
- uiscrollview
- MVVM
- uitableview
- Protocol
- SWIFT
- combine
- RxCocoa
- 리펙토링
- Xcode
- 리팩토링
- UICollectionView
- Human interface guide
- clean architecture
- 스위프트
- Observable
- 리펙터링
- map
- Refactoring
- ios
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] view위에 올라가있는 다른 view들을 하나의 tap gesture로 변경 본문
첫 번째 방법 - User Interaction Enabled를 비활성화
- button의 User Interaction Enabled를 비활성화하면 해결 (뒤에있는 View의 gesture에 의존)
Rx의 Observable.merge이용
Observable.merge(
sampleView.rx.tapGesture().map{ _ in }.asObservable(),
btn.rx.tap.asObservable()
).bind { _ in
self.count += 1
self.lbl.text = String(describing: self.count)
}.disposed(by: bag)
'iOS 응용 (swift)' 카테고리의 다른 글
[iOS - swift] tableView refresh (상단, 하단 새로고침) (0) | 2021.03.13 |
---|---|
[iOS - swift] keychain에 암호화/복호화하여 저장 방법 (SecureEnclave) (0) | 2021.03.12 |
[iOS - swift] textField의 placeholder색깔 변경 방법 (0) | 2021.03.09 |
[iOS - swift] mp4, gif 파일 재생 방법 (애니메이션, AVPlayer, Gifu 프레임워크) (0) | 2021.03.04 |
[iOS - swift] font 편리하게 사용 방법 (enum) (0) | 2021.03.03 |
Comments