TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2017 |
SwiftSwift Version | 4.0 |
SPMSupports SPM | ✗ |
Maintained by Kevin Johnson.
UINavigationItem subclass that indicates activity with UIActivityIndicator for right and left bar button items.
UINavigationItem subclass you can use to animate a UIActivityIndicatorView in the left/right positions - then when finished animating revert to your preset bar button items.
With CocoaPods, add ActivityIndicatingNavigationItem to your Podfile:
pod 'ActivityIndicatingNavigationItem'
Then install with pod install
.
Or you can manually import the files from the Source folder.
If you're using a Storyboard, set the name of the Class and Module, then create an outlet:
@IBOutlet weak var activityIndicatingNavigationItem: ActivityIndicatingNavigationItem!
Or set up programmatically:
let activityIndicatingNavigationItem = ActivityIndicatingNavigationItem.init(title: "Title", indicatorStyle: .white)
Start animating side:
activityIndicatingNavigationItem.startAnimating(.right)
Stop animating:
activityIndicatingNavigationItem.stopAnimating(.right)
Changing the style (default style is gray
):
activityIndicatingNavigationItem.indicatorStyle = .white
Written in Swift 4.0, requires iOS 10.3 and above, Xcode 9.0 and above.
Created by Kevin Johnson.
Available under the MIT license. See the LICENSE file for more info.