Created
October 25, 2024 07:41
-
-
Save aheze/4e9ff7ed431a4978327f0fdf00cf940b to your computer and use it in GitHub Desktop.
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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Image(systemName: "globe") | |
.imageScale(.large) | |
.foregroundStyle(.tint) | |
Text("Hello, world!") | |
Canvas { context, size in | |
let path = Path(roundedRect: CGRect(origin: .zero, size: size), cornerRadius: 16) | |
context.fill(path, with: .color(.blue)) | |
} | |
.border(.red) | |
} | |
.padding() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment