Created
January 24, 2021 13:25
-
-
Save prafullakumar/6942c1b03031202663153c2dcc66c27e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//step 2 - embed shape in viewModifier to help use with ease | |
struct CornerRadiusStyle: ViewModifier { | |
var radius: CGFloat | |
var corners: UIRectCorner | |
func body(content: Content) -> some View { | |
content | |
.clipShape(CornerRadiusShape(radius: radius, corners: corners)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment