APButton 5.0.1

APButton 5.0.1

LangLanguage SwiftSwift
License MIT
ReleasedLast Release Dec 2018
SPMSupports SPM

Maintained by Anton Plebanovich.

APButton 5.0.1

  • By
  • Anton Plebanovich


Carthage 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:




If you are setting APButton class in storyboard assure module field is also APButton

Please check official guide


github "APUtils/APButton"


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

pod 'APButton'



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.