简体   繁体   中英

iOS - On ipad standby my application gets stuck

I am using the following code to disable and enable View.

TO DISABLE VIEW.

  [[UIApplication sharedApplication] beginIgnoringInteractionEvents];
    _loadingSpinner.hidden = FALSE;

TO ENABLE VIEW.

[[UIApplication sharedApplication] endIgnoringInteractionEvents];
_loadingSpinner.hidden = true;

but when device goes into standby mode. application freezes. Users have close the application in the task pane in order to run it again.

Please HELP!!!!

Why are you disabling the view? If you are wanting to prevent interaction while a process completes, why not use something like MBProgressHUD or make your own Modal view and use that?

Put a breakpoint and check weather the code to end the interaction is hit at any time. Why dont you use a overlay view with the spinner or userInteractionEnabled Property of UIView for the purpose?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM