
addTarget 정리 Apple Developer Documentation developer.apple.com addTarget(_:action:for:) addTarget은 UIControl 클래스 안에 있는 인스턴스 메서드입니다. UIButton과 같이 UIControl 클래스 자식들은 사용이 가능합니다. 객체에 접근하여 특정 이벤트가 발생할 때 마다 자신이 작성한 메서드를 호출시킬 수 있습니다. 선언 func addTarget( _ target: Any?, action: Selector, for controlEvents: UIControl.Event ) 매개변수 target 대상 개체, 즉 action메서드가 호출된 개체입니다. 를 지정 nil하면 UIKit은 지정된 작업 메시지에 응답하는 개체에..

Swift UIButton 커스텀 하기 - Code Based 전체 코드 let customButton: UIButton = { let button = UIButton() // setTitle button.setTitle(" Custom Button ", for: .normal) // backgroundColor button.backgroundColor = .secondarySystemBackground // setTitle 텍스트 컬러 button.setTitleColor(.systemIndigo, for: .normal) // cornerRadius button.layer.cornerRadius = 8.0 return button }()
- Total
- Today
- Yesterday
- WebView
- SwiftUI
- 웹뷰
- dictionary
- 문자열
- gcd
- subscript
- SwiftLint
- LazyHStack
- UITabBarController
- github
- NavigationLink
- 라이트모드
- Firebase
- UIScrollView
- autolayout
- remote config
- Apple
- Observable
- RxSwift
- UIButton
- swipe
- Realtime Database
- Java
- Android
- ios
- 다크모드
- string
- Swift
- Alamofire
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |