An easy way to handle full screen activity indicator.
// Show spinner
LLSpinner.spin()
// Hide spinner
LLSpinner.stop()
// You can modify the background color and the activity indicator style
// To set the default background color
LLSpinner.backgroundColor = UIColor(white: 0, alpha: 0.6)
// and the default activity indicator style
LLSpinner.style = .whiteLarge
// Or
LLSpinner.spin(style: .whiteLarge, backgroundColor: UIColor(white: 0, alpha: 0.6))
// Add a handler that will trigger when the spinner is tapped
LLSpinner.spin() {
LLSpinner.stop()
}
LLSpinner is available through CocoaPods.
To install add the following line to your Podfile:
pod 'LLSpinner'
Add the following line to your Cartfile:
github "alaphao/LLSpinner"
Download and drop LLSpinner.swift
in your project.