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
Post a Comment