iOS Swift/Study
Swift 버튼에 시스템 이미지 크기 바꾸기
야고이
2024. 5. 4. 00:17
728x90
240503
왜 내 버튼의 이미지는 항상 요지부동일까,, 자 한번 바꿔보자
어떻게 해도 꿈적도 안하는 하트,,
let likeButton: UIButton = {
let button = UIButton()
let imageConfig = UIImage.SymbolConfiguration(pointSize: 100, weight: .light)
let image = UIImage(systemName: "heart", withConfiguration: imageConfig)
button.setImage(image, for: .normal)
button.tintColor = .gray
return button
}()
SymbolConfiguration 를 설정해줘야하더라!
스토리보드상에서도 이름이 똑같더라~~
화가나서 말이죠 100으로 넣었다가 ㅋㅋㅋ
25 정도로 줄여줬다 ㅎㅎ
728x90