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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift