-
-
Save AlexJuca/3227a93a7af60788f1e5f1af70727c21 to your computer and use it in GitHub Desktop.
Squircle in SwiftUI
This file contains 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
// Run in Swift Playground | |
import SwiftUI | |
import PlaygroundSupport | |
struct ContentView: View { | |
var body: some View { | |
Rectangle() | |
.fill(Color.red) | |
.frame(width: 200, height: 200) | |
.clipShape(RoundedRectangle(cornerRadius: 50, style: .continuous)) | |
} | |
} | |
PlaygroundPage.current.setLiveView(ContentView()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment