Guest User

Untitled

a guest
Dec 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. var screenSize = UIScreen.main.bounds
  2. var spinner:UIActivityIndicatorView?
  3. var progressLbl:UILabel?
  4.  
  5. func addspinner(){
  6. spinner = UIActivityIndicatorView()
  7. spinner?.center = CGPoint(x: (screenSize.width / 2) - ((spinner?.frame.width)! / 2) , y: 150)//讓圈圈在正中間
  8. spinner?.activityIndicatorViewStyle = .whiteLarge
  9. spinner?.color = #colorLiteral(red: 0.9607843161, green: 0.7058823705, blue: 0.200000003, alpha: 1)
  10. //用colorLiteral換圈圈顏色
  11. spinner?.startAnimating()
  12. pullUpView.addSubview(spinner!)//加在pullUpView上
  13. }
  14. //addspinner()一樣要加在@objc func dropPin(sender:UITapGestureRecognizer)才會動喔
Add Comment
Please, Sign In to add comment