[TIL] UIButton(type: .system) 안쓰면 혼남

Eden·4일 전
0

TIL

목록 보기
125/129
post-thumbnail

UIButton(type: .system) 안쓰면 혼난다. 이유는 iOS에서 시스템 스타일 버튼을 제공해 기본적인 터치 그리고 UI반응을 쉽게 구현할 수 있어서 써야한다!!!!!!!!!!!!!!!!

let button = UIButton(type: .system)
button.setTitle("Click Me", for: .normal)
button.tintColor = .systemBlue
button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside)

func buttonTapped() {
    print("버튼 클릭됨")
}
profile
Frontend🌐 and iOS

0개의 댓글

관련 채용 정보