Search code examples
iosobjective-cios13user-interactionsvprogresshud

SVProgressHUD user interaction Disable not working on Xcode 11 and iOS 13


Don't duplicate the question! I have checked many answers and try many solutions but nothing is woking.

I have newly created project on Xcode 11, and add SVProgressHUD on it and showing HUD it was working fine, but background component user interaction doesn't disable on it. Currently I have implemented below code:

[SVProgressHUD setDefaultStyle:SVProgressHUDStyleLight];
[SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeFlat];
[SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
[SVProgressHUD showWithStatus:@"Message"] ;

I use the latest version of the SVProgressHUD and use Xcode 11 and iOS 13. MaskType not working, how can I disable the user interaction?

Edit:

  • It was working fine on projects that Xcode 10 or below version.

Solution

  • I have fixed this issue, this issue occurs due to SceneDelegate files.

    I have set old behaviour back to the app:

    1. Delete the "Application Scene Manifest" entry from the Info.plist
    2. Delete the "UISceneSession lifecycle" methods from AppDelegate.m
    3. Delete the "SceneDelegate.h and SceneDelegate.m" files from project.
    4. Add the window property back to the AppDelegate (ex. @property (strong, nonatomic) UIWindow *window;)

    After that I have try to run with below code and it's working fine on app.

    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleLight];
    [SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeFlat];
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    [SVProgressHUD showWithStatus:@"Message"] ;