How to create a half circle in SwiftUI?

You can use the built-in .trim() modifier in SwiftUI to create parts of Shape! The .trim() modifier takes two parameters from: and to: which take in CGFloat.

half circle in swiftui
Half circle with .trim in SwiftUI

Published by Paul Young-Suk Lee

SWE @lyft. Currently working on data infrastructure

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: