Created
January 24, 2021 13:26
-
-
Save prafullakumar/8f9bffc62d9c1089259afea1564b0a4a 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 3 - crate a polymorphic view with same name as swiftUI's cornerRadius | |
extension View { | |
func cornerRadius(radius: CGFloat, corners: UIRectCorner) -> some View { | |
ModifiedContent(content: self, modifier: CornerRadiusStyle(radius: radius, corners: corners)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment