Skip to content

Instantly share code, notes, and snippets.

@hasanalisiseci
Created February 24, 2020 08:49
Show Gist options
  • Save hasanalisiseci/5d49baf9dff6acf6651c7fa14cb4c90d to your computer and use it in GitHub Desktop.
Save hasanalisiseci/5d49baf9dff6acf6651c7fa14cb4c90d to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
imageView.isUserInteractionEnabled = true // Görseli tıklanabilir hale getirdik.
//Gesture Recognizer'ı oluşturup action kısmında içine "changePic" fonskiyonunu gönderdik
let changeGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(changePic))
//Daha sonra Gesture Recognizer'ı görselimze ekledik.
imageView.addGestureRecognizer(changeGestureRecognizer)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment