how to check the number of clicks the user clicks on an image in swift -


is there function count numbers of click user clicks on image , when user starts clicking on image count resets. example : there image requires user click on 3 times , image comes out requires user click on 5 times , there function can me in touchbegan method.

you can use uitapgesturerecognizer , add 1 image views need. selector can choose same method every gesture recognizer. when user press in method increase counter , save view has received tap, if user change view can find mismatch between previous view , pressed one. in case reset couter.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -