반응형
쿠팡 클론 프론트 부분 클론 코딩중 예시 이미지를 넣을려는데 짤린다. 스토리보드에서는 이미지 크기를 설정 할 수 있는 것이 보이지 않는다.
아울렛 변수로 선언후 아래와 같이 해도 되공, 스토리 보드에서 백그라운드로 바꾸어 해도 된다.
import UIKit
class UseInfoController : UIViewController{
@IBOutlet weak var Button1: MyBtn!
override func viewDidLoad() {
super.viewDidLoad()
Button1.setImage(UIImage(named:"IMG_1715"),for: .normal)
Button1.contentVerticalAlignment = .fill
Button1.contentHorizontalAlignment = .fill
Button1.imageEdgeInsets = UIEdgeInsets(top: 2, left: 2, bottom: 2, right: 2)
}
}
요 세 놈들을 슥삭 수정 하면
짜란~
반응형
'iOS > UIKit' 카테고리의 다른 글
[Swift/iOS] 네.아.로 네이버 로그인 구현하기 (0) | 2023.02.26 |
---|---|
[Swift] SegmentsController Underline 밑줄 왔다리 갔다리 (2) | 2023.02.06 |
[Swift UI Kit] 서치바 커스텀하기 (0) | 2023.01.26 |
[Swift UI Kit] 스토리보드로 만든 탭바 순서 변경 및 시작 첫 화면 설정 (0) | 2023.01.23 |
(Swift 에러) "~~"is unreachable because it has no entry points, and no identifier for runtime access via (0) | 2023.01.23 |