Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Demo code of styling border in SwiftUI
// --snip--
renderView = AnyView(configuration.label
.background(backgroundColor!)
.frame(width: iconSize!.rawValue, height: iconSize!.rawValue, alignment: .center)
.clipShape(RoundedRectangle(cornerRadius: iconSize!.rawValue))
.overlay(RoundedRectangle(cornerRadius: iconSize!.rawValue)
.stroke(borderStyle!.color, lineWidth: borderStyle!.width))
)
// --snip--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.