这个开源组件主要使用在系统开发的微信 登录上,这个组件的效果有点中国文。 使用它主要是因为mit协议
开源地址:
https://github.com/roytornado/RSLoadingView
引入
pod "RSLoadingView"
通过终端cd到项目所在的目录,然后执行
pod install
然后在异步调用开结的时候
let loadingView = RSLoadingView()
loadingView.mainColor=UIColor.mainBlue //这个指定加载效果的颜色默认白色
loadingView.show(on: view)
在结束的时候
RSLoadingView.hide(from: self.view)
shouldDimBackground 是否需要底色
sizeFactor 加载条大小
sizeInContainer 加载圆的大小