HIT해
[SwiftUI] 기울어지게 배치하기 본문
728x90
ZStack {
VStack{
Text("\(index + 1)").foregroundColor(index < 3 ? .white : Color(hex: "3D3D3D")).fontWeight(.bold).font(.system(size: 130))
}
.frame(width : 190 , height: 190)
.background(
index < 3 ?
LinearGradient(colors: [numberTop[index % 3] ,numberBottom[index % 3]], startPoint: .top, endPoint: .bottom) : LinearGradient(colors: [numberTop[3] ,numberBottom[3]], startPoint: .top, endPoint: .bottom)
)
.cornerRadius(60)
.rotationEffect(.degrees(-28)).offset(x:120,y:-30)
'Swift > Swift 개발 노트' 카테고리의 다른 글
앱스토어 배포하기 - 처음부터 끝까지 (0) | 2024.04.16 |
---|---|
[SwiftUI] 스크롤뷰 두개씩 배치하기 (0) | 2024.03.31 |
[상추] 개인정보처리방침 (0) | 2024.03.28 |
[SwiftUI] 배경 그라데이션 적용하기 (0) | 2024.03.20 |
[SwiftUI] 카메라 앱 기능 구현하기 (AVFoundation) (0) | 2024.03.19 |