05-18 17:53
Notice
Recent Posts
Recent Comments
Link
목록버튼 (1)
코딩일지
버튼에 이미지 삽입하기
* UIButton에 이미지 삽입하기 1. 사용할 이미지를 상수 변수로 선언 let heart : UIImage = UIImage(named:"heart")! // 채운 하트 모양 let no_heart : UIImage = UIImage(named:"no-heart")! // 빈 하트 모양 2. 해당 버튼에 setImage함수 이용하여 변수 대입 clickBtn.setImage(no_heart, for: UIControlState.normal)clickBtn.setImage(heart, for: UIControlState.normal)
코딩/iOS
2017. 3. 30. 20:55