shadow with radius

2023. 4. 18. 14:43Frontend/Swift

https://stackoverflow.com/questions/58933590/how-to-give-shadow-with-cornerradius-to-a-button-in-swiftui

How to give shadow with cornerRadius to a Button in SwiftUI

I'm trying to give a shadow to Button using following code. Code: Button(action: { }) { Text("SIGN IN") .font(.system(size: 17)) ...

stackoverflow.com

원하는 뷰가 radius를 가지면서 shadow를 주는 법
 

.background(
            RoundedRectangle(cornerRadius: 25)
                .fill(Color.white)
                .shadow(color: .gray, radius: 2, x: 0, y: 2)

 

'Frontend > Swift' 카테고리의 다른 글

ISOstring to date  (2) 2023.04.18
StoryBoard vs. SwiftUI  (0) 2023.03.21
HTML, CSS view in Swift  (1) 2023.03.16