Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Firebase
- Apple
- geofencing
- 웹뷰
- Swift
- MacOS
- window
- github
- SwiftUI
- 이미지
- 개발자
- Git
- view
- 한글
- iOS16
- appstore
- Notification
- rxswift
- Archive
- mac
- Session
- Realm
- Code
- FLUTTER
- error
- UIButton
- IOS
- Xcode
- JPA
- darkmode
Archives
- Today
- Total
EEYatHo 앱 깎는 이야기
iOS, Swift 콜렉션뷰 셀 크기 유동적 + AutoLayout + Corner + Shadow 본문
반응형
corner이나 shadow는 한번만 해줘도 되고,
중요한건 layoutSubviews
/// 제목 길이에 따라 셀 크기가 다르므로 처리해줘야 할 것들
override func layoutSubviews() {
super.layoutSubviews()
// 그림자 제대로 다시 그리기 + 그림자 그리는 성능 향상
layer.shadowPath = UIBezierPath(roundedRect: bounds, cornerRadius: 12).cgPath
// 제약 업데이트
updateConstraints()
}
good
Comments