Danny Behar @dbehar.com · Dec 15

I keep needing to make a stroked border around Images in SwiftUI so I created a ViewModifier for it! Since it takes a Shape and ShapeStyle, you can style it with the shape and color / gradient of your choosing :D Check out the code below! 👇

4 likes 1 replies

?

Replies

Danny Behar · Dec 15

And here is the CODE - (check the alt-text for the raw text) Included is a convenience function which defaults the clipped shape to a RoundedRectangle ▢