- This topic has 2개 답변, 2명 참여, and was last updated 5 months 전에 by
Joseph Kim.
2 답변 글타래를 보이고 있습니다
-
글쓴이글
-
-
Joseph Kim참가자
- 글작성 : 3
- 답글작성 : 3
1,320 포인트
안녕하세요?
storyboard 없이 button 만들어서 UIView위에 놨습니다.
button을 눌렀을 때, 잠시동안 깜박이거나 색깔을 다른 것으로 바꾸게 하는 방법이 있을까요?
call은 되는데 깜박이는 것이 없으니 emulator에서 눌렀는지 확인이 안되네요.
아래는 button setting 한 것입니다.
=============================
myButton.setTitle(“Button”, for: .normal)
myButton.backgroundColor = .blue
myButton.setTitleColor(.white, for: .normal)
myButton.titleLabel?.font = .systemFont(ofSize: 40)
myButton.addTarget(self, action: #selector(onClickedBtn), for: .touchUpInside)
======== 아래는 클릭할 때 부르는 func ====================
@objc func onClickedBtn() {
print(“MainViewController – onClickedFindChargeStationBtn() called”)
}
2022-03-10 오후 4:21 #52755 -
Joseph Kim참가자
- 글작성 : 3
- 답글작성 : 3
1,320 포인트
2022-03-10 오후 8:15 #52786
-
-
글쓴이글
2 답변 글타래를 보이고 있습니다
- 답변은 로그인 후 가능합니다.