EMSpinnerButton is an elegant button with a spinner animation and is fully customizable.
Inspired by the Starbucks app
- Features
- Requirements
- Installation
- Usage
- Customization
- Title
- Corner Radius
- Title Color
- Background Color
- Background Gradient Color
- Spinner Color
- License
- Title
- Gradient Background (Optional)
- Various animations
- Fully Customizable
- CocoaPods
- iOS 9.0+
- Xcode 9+
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate EMSpinnerButton into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'EMSpinnerButton'
end
Then, run the following command:
$ pod install
In the storyboard add a UIButton and change its class to EMSpinnerButton
// Collapse animation
button.animate(animation: .collapse)
// Expand animation
button.animate(animation: .expand)
// Shake animation
button.animate(animation: .shake)
button.title = "LOGIN"
// Default title = nil
button.cornerRadius = button.frame.height/2
// Default corner radius = 0
button.titleColor = UIColor.red
// Default color = UIColor.white
button.backgroundColor = UIColor.white
// Default color = UIColor(red: 49/255, green: 177/255, blue: 229/255, alpha: 1.0)
button.gradientColor = UIColor.white
// Default colors = nil
button.spinnerColor = UIColor.lightGray.cgColor
// Default color = UIColor.white.cgColor
EMSpinnerButton is available under the MIT license. See the LICENSE file for more info.