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
- swiftUI
- RxCocoa
- Clean Code
- 리펙터링
- Observable
- swift documentation
- 클린 코드
- UICollectionView
- Xcode
- UITextView
- HIG
- rxswift
- 스위프트
- clean architecture
- collectionview
- uitableview
- SWIFT
- Refactoring
- 애니메이션
- tableView
- combine
- 리펙토링
- 리팩토링
- ribs
- map
- MVVM
- uiscrollview
- ios
- Human interface guide
- Protocol
Archives
- Today
- Total
목록액션 클로저 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] UIControl의 UIButton 액션 클로저 만드는 방법 (touchUpInside, UIControl.Event, objc_setAssociatedObject)
일반적인 UIButton의 action 처리 방법 UIButton의 인스턴스 메소드인 addTarge(_:action:for:)를 사용하여 처리 단점은 button의 addTarget하는 부분에서 특정 지역변수에 대한 기능을 touchUpInside 액션 시 동작하게 하기 어려운 점이 존재 아래 abc 지역 프로퍼티를 button의 touchUpInside될 때 출력하고 싶어도 어려운 상태 button의 클로저로 만들면? (아래에서 계속) class ViewController: UIViewController { private let button = UIButton() override func viewDidLoad() { super.viewDidLoad() let abc = 123 button.transl..
iOS 응용 (swift)
2023. 1. 6. 23:36