anl

ANLongTapButton

Long tap button with animated progress bar.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

64

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Categories

Readme

ANLongTapButton

Cocoapods Compatible Swift 4.2

Long tap button with animated progress bar.

Requirements

  • iOS 8.0+
  • Swift 4.2
  • ARC

##Installation

####CocoaPods Available on CocoaPods. Just add the following to your project Podfile:

pod 'ANLongTapButton'
use_frameworks!

Usage

  • In IB add UIButton to your view.
  • In IB set class of UIButton to ANLongTapButton.
  • In IB set module name of UIButton to ANLongTapButton.
  • In IB drag action to your controller with Touch Down Event (NOT Touch Up Inside!).
  • In your action method add implement didTimePeriodElapseBlock.
@IBAction func onPayNowButtonTapped(longTapButton: ANLongTapButton)
{
  longTapButton.didTimePeriodElapseBlock = { () -> Void in
    let alert = UIAlertController(title: "Payment", message: "Payment has been made.", preferredStyle:   UIAlertControllerStyle.Alert)
    alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
    self.presentViewController(alert, animated: true, completion: nil)
  }
}

See example project for more details.

Author

Sergey Demchenko, antrix1989@gmail.com

License

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100