Swift 3 - Detect total number of touches on a screen at any time

298 views Asked by At

I am trying to detect the number of fingers on a screen in a UIView, and then wait to show another view only if there are exactly 2 touches on the UIView.

So far, I have tried to detect the number of touches by using a UITapGestureRecognizer. It yields the right number of touches when called, but I cannot make it wait until there are two touches, as using a while statement on the numberOfTouches property freezes the app.

0

There are 0 answers