UITapGestureRecognizer not works iOS swift

 Solution:


 let tapGesture = UITapGestureRecognizer(target: self, action: #selector(gestureTap(_:)))

  tapGesture.numberOfTapsRequired = 1

  cell.img.addGestureRecognizer(tapGesture)


If you added two recognizer methods to a imageview then only one tapgesture will works.


So must add only one tapgesture to a view.Then only it will works.



Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift