Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.55 KB | None | 0 0
  1.   override func viewDidLoad() {
  2.     super.viewDidLoad()
  3.     let flipCoin = UIPanGestureRecognizer(target: self, action: #selector(flippCoinPan(_:)))
  4.    
  5.      coinImageView .addGestureRecognizer(flipCoin )
  6.   }
  7.  
  8.  
  9.   @IBAction func menuButtonClicked(_ sender: UIButton) {
  10.     Router.shared.goToMenuView(from: self)
  11.   }
  12.  
  13.   @objc func flippCoinPan(_ recognizer: UIPanGestureRecognizer) {
  14.      if recognizer.state == .began {
  15.       print("dgdf")
  16.       coinImageView.image =  imageLiteral(resourceName: "coinSide.png")
  17.  
  18.       rotateCoin()
  19.     }
  20.  
  21.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement