Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to disable user interaction of an iOS app

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.51k
    Comment on it

    In iOS application there are only few ways to disable user interaction for the whole screen or UI. Some developers use property (User Interaction Enabled) for a specific control, some uses MBProgressHud class by displaying spinner or some uses user interaction disabled view.
    But apple does have a single line of code to ignore interaction events.
    Here it is:-

    To disable interaction

    [[UIApplication sharedApplication] beginIgnoringInteractionEvents];
    

    To enable interaction

    [[UIApplication sharedApplication] endIgnoringInteractionEvents];
    

    Happy Coding!!!

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: