iOS/AutoLayout
-
기존변경출처 How do I put the image on the right side of the text in a UIButton?I don't want to use a subview if I can avoid it. I want a UIButton with a background image, text, and an image in it. Right now, when I do that, the image is on the left side of the text. The backg...stackoverflow.com
[iOS] storyboard에서 UIButton Image 오른쪽에 배치하기기존변경출처 How do I put the image on the right side of the text in a UIButton?I don't want to use a subview if I can avoid it. I want a UIButton with a background image, text, and an image in it. Right now, when I do that, the image is on the left side of the text. The backg...stackoverflow.com
2024.06.09 -
storyboard에서 UIButton의 titleLabel에 접근하려면 기본 세팅이 위와 같이 되어 있어야 한다.아래 코드로 작성한다.let button = UIButton()button.titleLabel?.text = "버튼" // Textbutton.titleLabel?.font = .systemFont(ofSize: 19.0, weight: .bold) // Fontbutton.titleLabel?.textColor = .black // TextColor 출처 How to change font of UIButton with SwiftI am trying to change the font of a UIButton using Swift... myButton.font = UIFont(name: "...
[iOS] UIButton titleLabelstoryboard에서 UIButton의 titleLabel에 접근하려면 기본 세팅이 위와 같이 되어 있어야 한다.아래 코드로 작성한다.let button = UIButton()button.titleLabel?.text = "버튼" // Textbutton.titleLabel?.font = .systemFont(ofSize: 19.0, weight: .bold) // Fontbutton.titleLabel?.textColor = .black // TextColor 출처 How to change font of UIButton with SwiftI am trying to change the font of a UIButton using Swift... myButton.font = UIFont(name: "...
2024.05.29 -
[AutoLayout] SafeArea보다 더 높이 출력 2022.10.12
-
Multiplier(비율) - Leading/Top(시작지점)에서는 변화 없음 → Trailing/Bottom(끝나는 지점)에서 값 만큼 변화(결과 값이 있는데 그 결과 값에 따라 달라짐) - Costrant : 어떤 지점에서 값만큼 변화 - Multiplier = 3:1 → 3, 1:3 → 1/3 - Multiplier = 2 일때 (Equal Widths = 200) - 왼쪽은 2배, 오른쪽은 1/2 배 - Align에서 Multiplier(왼쪽은 2, 오른쪽은 0.5) - Align x = 1.5, y = 1.5
[AutoLayout] MultiplierMultiplier(비율) - Leading/Top(시작지점)에서는 변화 없음 → Trailing/Bottom(끝나는 지점)에서 값 만큼 변화(결과 값이 있는데 그 결과 값에 따라 달라짐) - Costrant : 어떤 지점에서 값만큼 변화 - Multiplier = 3:1 → 3, 1:3 → 1/3 - Multiplier = 2 일때 (Equal Widths = 200) - 왼쪽은 2배, 오른쪽은 1/2 배 - Align에서 Multiplier(왼쪽은 2, 오른쪽은 0.5) - Align x = 1.5, y = 1.5
2022.10.10 -
Align(정렬) - Object들을 정렬할 때 사용 - 한 개의 Object만 있을 때는 Horizontally/Vertically만 사용 가능 → 가운데 정렬 - 왼쪽 상단 정렬(Leading + Top) - 오른쪽 상단 정렬(Trailing + Top) - Object 내부에 정렬 - Constant 값으로 조절 가능
[AutoLayout] AlignAlign(정렬) - Object들을 정렬할 때 사용 - 한 개의 Object만 있을 때는 Horizontally/Vertically만 사용 가능 → 가운데 정렬 - 왼쪽 상단 정렬(Leading + Top) - 오른쪽 상단 정렬(Trailing + Top) - Object 내부에 정렬 - Constant 값으로 조절 가능
2022.10.09 -
Constraints(간격) - View의 Constraints 20씩 지정 - 다른 Device에서 호출하여도 20씩 Constraints 적용됨 - 가로 모드로 바뀌어도 적용됨 - Leading : Object가 시작하는 지점(왼쪽 → 오른쪽) - Trailing : Object가 끝나는 지점(오른쪽 → 왼쪽) - Top/Bottom : 위/아래 - Constraints가 지정되지 않았다 → 오류 발생 - 높이가 지정이 안되어있어 Height 지정 - Width/Height 만 지정 → 오류 발생 (Need constraints for: X/Y position) - Constraints 추가 여러 개의 Object들의 Constraints 설정 - 파란색 뷰에서 Constraints 설정 → 오류 -..
[AutoLayout] ConstraintsConstraints(간격) - View의 Constraints 20씩 지정 - 다른 Device에서 호출하여도 20씩 Constraints 적용됨 - 가로 모드로 바뀌어도 적용됨 - Leading : Object가 시작하는 지점(왼쪽 → 오른쪽) - Trailing : Object가 끝나는 지점(오른쪽 → 왼쪽) - Top/Bottom : 위/아래 - Constraints가 지정되지 않았다 → 오류 발생 - 높이가 지정이 안되어있어 Height 지정 - Width/Height 만 지정 → 오류 발생 (Need constraints for: X/Y position) - Constraints 추가 여러 개의 Object들의 Constraints 설정 - 파란색 뷰에서 Constraints 설정 → 오류 -..
2022.10.08