Dots is the replacement of UIActivityIndicatorView. It provides modern and highly customizable loading indicator. You can call this dots loading view from everywhere in your program with just 2 lines of code.
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 10.0 +
Dots is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DotsLoading"
In your ViewController, run below.
let loadingView = DotsLoadingView(colors: nil)
self.view.addSubview(loadingView)
loadingView.stop()
You can use custom dot colors.
Note: You need to create array which includes four UIColors. If you specify less than or more than 4 colors, the colors of dots will be default.
let dotColors = [UIColor.red, UIColor.blue, UIColor.green, UIColor.yellow]
let loadingView = DotsLoadingView(colors: dotColors)
self.view.addSubview(loadingView)
makomori, [email protected]
Dots is available under the MIT license. See the LICENSE file for more info.