일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- SwiftUI
- reactorkit
- Xcode
- raywenderlich
- Flutter
- 패스트캠퍼스
- combine
- XCTest
- designpattern
- arkit
- MVVM
- RxSwift
- 프로그래머스
- SnapKit
- ios
- CollectionView
- BFS
- realm
- Kuring
- Swfit
- 백준
- node.js
- tableView
- BOJ
- Lv2
- TCA
- swift
- visionOS
- rxcocoa
- UIKit
Archives
- Today
- Total
lgvv98
[iOS] UIButton SystemIamge 크기 조절 본문
UIButton SystemIamge 크기 조절
✅ 버튼에 이미지를 넣은 후에 크기 조절하는 코드를 알아보자.
✅ 코드
let taskAddButton: UIButton = {
let button = UIButton()
let imageConfig = UIImage.SymbolConfiguration(pointSize: 30, weight: .light)
let image = UIImage(systemName: "plus", withConfiguration: imageConfig)
button.setImage(image, for: .normal)
button.tintColor = .white
button.layer.cornerRadius = 27.5
button.backgroundColor = #colorLiteral(red: 0.7332392335, green: 0.7877069116, blue: 0.4581792951, alpha: 1)
return button
}()
만약 Image에 configuration을 적용하지 않는다면, 안에 이미지가 아주 작게 나타날 것이다!!
'⚠️ deprecated ⚠️ > Calendar' 카테고리의 다른 글
[iOS] UITableView BackgroundView didTapped ✨ (0) | 2022.05.04 |
---|---|
[iOS] Swift Calendar 첫 날과 마지막 날 찾기 (0) | 2022.05.03 |
[iOS] collectionViewCell 사이에 공백없애기 (0) | 2022.05.02 |
[iOS15] Device width, height in safeAreaLayoutGuide (0) | 2022.05.02 |
Comments