Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var screenSize = UIScreen.main.bounds
- var spinner:UIActivityIndicatorView?
- var progressLbl:UILabel?
- func addspinner(){
- spinner = UIActivityIndicatorView()
- spinner?.center = CGPoint(x: (screenSize.width / 2) - ((spinner?.frame.width)! / 2) , y: 150)//讓圈圈在正中間
- spinner?.activityIndicatorViewStyle = .whiteLarge
- spinner?.color = #colorLiteral(red: 0.9607843161, green: 0.7058823705, blue: 0.200000003, alpha: 1)
- //用colorLiteral換圈圈顏色
- spinner?.startAnimating()
- pullUpView.addSubview(spinner!)//加在pullUpView上
- }
- //addspinner()一樣要加在@objc func dropPin(sender:UITapGestureRecognizer)才會動喔
Add Comment
Please, Sign In to add comment