NNLoaderView
一个简单的加载视图,易于定制。
集成:CocoaPods (iOS 11+)
platform :ios, '11.0'
use_frameworks!
target 'MyApp' do
pod 'NNLoaderView'
end
如何使用
-
在 App Delegate 的 -didFinishLaunchingWithOptions 中设置加载器
NNLoaderView.shared.circleCount = 4; NNLoaderView.shared.circleRadius = 10; NNLoaderView.shared.circleColor = UIColor.purple; NNLoaderView.shared.changeColor = UIColor.cyan;
可供选择的动画类型
NNLoaderView.shared.animationType = .scale; NNLoaderView.shared.animationType = .bounce; NNLoaderView.shared.animationType = .fadeInOutLenear; NNLoaderView.shared.animationType = .changeColor;
-
现在在您的 ViewController 中使用它
NNLoaderView.shared.show(inView: self.view); // To add the loaderview NNLoaderView.shared.remove(); // To remove the loaderview