Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
SSSpinnerButton is an elegant button with a different spinner animations.
CocoaPods
You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile:
use_frameworks!
pod 'SSSpinnerButton'
import UIKit
import SSSpinnerButton
Carthage
Add github simformsolutions/SSSpinnerButton
to your project's Cartfile
Manually
In the storyboard add a UIButton and change its class to SSSpinnerButton
StartAnimation
button.startAnimate(spinnerType: SpinnerType.ballClipRotate, spinnercolor: UIColor.red, spinnerSize: 20, complete: {
// Your code here
})
StopAnimation
button.stopAnimate(complete: {
// Your code here
})
StopAnimation with completion types
button.stopAnimatingWithCompletionType(completionType: .success, complete: {
// Your code here
})
StopAnimation with completion types and back to defaults
button.stopAnimationWithCompletionTypeAndBackToDefaults(completionType: .fail, backToDefaults: true, complete: {
// Your code here
})
Version 3.0.1
Version 2.0.1