Advertisement
neatekFb

Swipe to back UIView // swift 3

Nov 22nd, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.45 KB | None | 0 0
  1. //// Vladimir Zhelnov - neatek.pw - Web/iOS dev
  2. override func viewDidLoad() {
  3.     let recognizer: UISwipeGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.swipeRight))
  4.     recognizer.direction = .right
  5.     self.view .addGestureRecognizer(recognizer)
  6. }
  7.  
  8. func swipeRight() {
  9.     print("Swipe")
  10.     _ = navigationController?.popViewController(animated: true)
  11.     //self.performSegueWithIdentifier("MySegue", sender: self)
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement