Contents
Installation
CocoaPods
Pinwheel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Pinwheel"
Carthage
Pinwheel is available through Carthage. To install it, simply add the following line to your Cartfile:
github "Astranno/Pinwheel" == 1.0.0
Submodule
If you don't use CocoaPods, you can still add Pinwheel as a submodule, drag and drop Pinwheel.xcodeproj into your project, and embed Pinwheel.framework in your target.
- Drag
Pinwheel.xcodeprojto your project - Select your app target
- Click the
+button on theEmbedded binariessection - Add
Pinwheel.framework
Manual
You can directly drag and drop the needed files into your project, but keep in mind that this way you won't be able to automatically get all the latest Pinwheel features.
Usage
Setup
Make sure to import Pinwheel:
import PinwheelInitialize a PinwheelActivityIndicator
Initialize Using a Pre-Defined Size
let pinwheelActivityIndicator = PinwheelActivityIndicator(style: .normal)or
let pinwheelActivityIndicator = PinwheelActivityIndicator(style: .large)If no parameters are set, the normal style will be selected.
Initialize Using a Custom Size
let pinwheelActivityIndicator = PinwheelActivityIndicator(size: 30)Animating the Pinwheel
Start Animating
pinwheelActivityIndicator.startAnimating()Stop Animating
pinwheelActivityIndicator.stopAnimating()Pinwheel Options
Use the isAnimating property to return a boolean of whether the indicator is spinning or not.
pinwheelActivityIndicator.isAnimatingSet the hidesWhenStopped property to tell the indicator whether or not to hide itself when it is done spinning. This can also be set in the initializer. The default value is true.
pinwheelActivityIndicator.hidesWhenStopped = falseLicense
Pinwheel is available under the MIT license. See the LICENSE file for more info.
Made with
