Swiftpack.co - APUtils/APButton as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by APUtils.
APUtils/APButton 6.0.2
Button with ability to show loading indicator and animate depended views
⭐️ 2
🕓 4 weeks ago
iOS tvOS
.package(url: "https://github.com/APUtils/APButton.git", from: "6.0.2")


Swift Package Manager compatible Version License Platform CI Status

Button with ability to show loading indicator and animate depended views according to button state. Try to mimic system button animations while provides ability to make button from several views: background view, image view, overlay view, etc.


To run the example project, clone the repo, and run pod install from the Example directory first.

GIF animations

Activity indication:




APButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'APButton', '~> 6.0'



Set custom class for your button in storyboard, assure module field is also APButton:

Add as many dependend views as you like:

Button outlet example:

@IBOutlet private weak var button: APButton!

Button action example:

@IBAction private func onButonTap(_ sender: APButton) {}


You can set overlay color so instead of dim dependend views button will put overlay over self.

Setting rounded to On will make button corners rounded.


To start activity call button.startAnimating(), to finish call button.stopAnimating().

State changes

Button animations for taps are automatic.

If you want your dependend labels to change color for disabled state, their color should match APButton title color for state normal and their disabled state color will be APButton title color for state disabled then.

There are many ways and a lot of flexibility of how you can compose your button. See example project for more details.


Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.


Anton Plebanovich, [email protected]


APButton is available under the MIT license. See the LICENSE file for more info.


Stars: 2
Last commit: 3 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics