iOS-UIActivityIndicatorView基本使用 (系统loading加载)

在这里插入图片描述

   lazy var indicatorView:UIActivityIndicatorView = {
    
    
        let tempview = UIActivityIndicatorView.init(style:.large)
        tempview.frame = CGRect.init(x: 200, y: 200, width: 100, height: 100)
        tempview.color = .white
        tempview.backgroundColor = .black
        return tempview
    }()
 override func viewDidLoad() {
    
    
        super.viewDidLoad()
        view.backgroundColor = .brown
        view.addSubview(indicatorView)
        indicatorView.startAnimating()//旋转动画
   }
  indicatorView.stopAnimating() //停止旋转
        
  indicatorView.hidesWhenStopped =  true //停止旋转的时候 隐藏
         
   indicatorView.isAnimating //是否在炫转

猜你喜欢

转载自blog.csdn.net/weixin_43259805/article/details/123225292
今日推荐