How to map beginIgnoringInteractionEvents before adding endIgnoringInteractionEvents

I use these two functions [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; and [[UIApplication sharedApplication] endIgnoringInteractionEvents]; while I download data from the server.

The error below appears in my log.

 -[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring. 

I tried to search on several links, but I can not find a suitable solution for this.

How to disable screen touch without using beginIgnoringInteractionEvents?

What is "- overflow [UIApplication beginIgnoringInteractionEvents]. Ignoring." ?

Ignoring UI Events in AppKit

beginIgnoringInteractionEvents or userInteractionEnabled = NO does not work as expected

+6
source share
1 answer

You can always check.

 if ([[UIApplication sharedApplication] isIgnoringInteractionEvents])... 
+11
source

All Articles