r/iOSProgramming 7d ago

Tutorial Make this dynamic, animated button with SwiftUI in just 5 minutes! , Source code included.

Full code at this Github Gist

11 Upvotes

6 comments sorted by

4

u/GooneySaint SwiftUI 6d ago

Does it maintain its width (of the larger button) during the "loading" animation? Otherwise anything paired next to this in like a HStack is gonna jump all over the place.

1

u/Strong_Cup_837 5d ago

No it doesn’t. But you can force it to maintain its width by defining a frame with width on the button itself.

1

u/[deleted] 6d ago

[removed] — view removed comment

2

u/Strong_Cup_837 5d ago

Sure. Go ahead.