How to create a capsule button with text in SwiftUI (Xcode 13.1, iOS 14+, Swift5)

Use the .overlay with a view and the built-in Capsule shape to create a capsule button with text 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:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: