Swift_IOS之UIActivityIndicatorView加载齿轮控件
// // ViewController.swift // helloIOS // // Created by loaderman on 2019/1/25. // Copyright © 2019年 loaderman. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var tipLoadView: UIActivityIndicatorView! @IBAction func stopBtn(_ sender: UIButton) { tipLoadView.stopAnimating() } @IBAction func startBtn(_ sender: UIButton) { tipLoadView.startAnimating() } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
点击开始,显示,点击停止,取消
over~~~
最后,关注【码上加油站】微信公众号后,有疑惑有问题想加油的小伙伴可以码上加入社群,让我们一起码上加油吧!!!