ios - Detect tap on image view -
i building app, have image , want action happen when tap on image. have set of design, changing image view button image lot of work.
is there way constrain button same size image, , @ same place?
set image view's userinteractionenabled
true
, add uitapgesturerecognizer
image view.
you can in storyboard checking “user interaction enabled” checkbox, dragging tap gesture recognizer onto image view, , connecting tap gesture recognizer action in view controller.
Comments
Post a Comment