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.

storyboard demo


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -