Disabling user interaction of the current view on screen

Maybe you want the whole application to not react at all?

[[UIApplication sharedApplication] beginIgnoringInteractionEvents];

use [[UIApplication sharedApplication] endIgnoringInteractionEvents]; to revert this
(credits to nerith)

same for Swift:

UIApplication.sharedApplication().beginIgnoringInteractionEvents()
UIApplication.sharedApplication().endIgnoringInteractionEvents()

and Swift 3/4

UIApplication.shared.beginIgnoringInteractionEvents()
UIApplication.shared.endIgnoringInteractionEvents()

edit for iOS 13:
beginIgnoringInteractionEvents is deprecated in iOS13

just make a new full size View and lay it over your current view.
that will allow you to block any user interaction.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)