带有动画进度条的长时间按按钮。
@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)
}
}
参见示例项目以获取更多详细信息。
Sergey Demchenko, [[email protected]]
ANLongTapButton 免费提供 MIT 许可证。有关更多详细信息,请参阅 LICENSE 文件。