Matt Buckley
Nice Things | iOS + Android Development
1 min readNov 25, 2019

--

Like this post? See what we’re doing at Nice Things — we’re the creators of BentoBlox.We also build and maintain great mobile apps for clients large and small. We’d love to work with you on your next project.

SwiftUI’s Shapeprotocol gives us a simple 2D shape that can be customized and animated.

We can choose from Circle, Ellipse, Capsule, RoundedRectangle, among others. Calling .trim allows us to specify the “fraction” of the shape to draw. .stroke specifies that only the outline of the shape be drawn. We specify a frameto contain the shape, and an animation to control the look and feel of how the shape is drawn.

Like this post? See what we’re doing at Nice Things — we’re the creators of BentoBlox.We also build and maintain great mobile apps for clients large and small. We’d love to work with you on your next project.

--

--