iosobjective-cuiwindowsvprogresshud

Changing UIWindow causes SVProgressHUD to not appear


I have 2 UIWindows that I use in my app. In AppDelegate, in the method didFinishLaunchingWithOptions: I simply have:

        self.windowStartup = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        self.windowSplit =  [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

Then I set up self.windowSplit as a splitViewController and windowStartup with a xib as its rootViewController. If I load windowSplit from didFinishLaunchingWithOptions:, then SVProgressHUD works great, however if I load windowStartup in didFinishLaunchingWithOptions:, then call:

    [self.windowSplit makeKeyAndVisible];

at a later time, SVProgressHUD won't work. Everything else is working as expected. My desire is go get SVProgressHUD working for the 2nd scenario, but also to find out if there something I am doing wrong that could impact on anything else.

For a little more info, the reason why I am taking this approach is that I want to use the standard split view controller, however I want to load the startup view first, without it just appearing over the top of the splitView on the iPad. After the user has set things up they can decide if they want the startup view to show initially.

Thanks in advance for any help!


Edit: Here is my code for startup:

   Startup *controller = [[Startup alloc] initWithNibName:@"Startup" bundle:nil];
    self.windowStartup.rootViewController = controller;
    [self.windowStartup makeKeyAndVisible];

Solution

  • It was a simple naming issue. I had issues with SVProgressHUD and ShareKit. Both were looking for the

        .window 
    

    property of my appDelegate. I went back to the standard

        UIWindow *window 
    

    and it works fine again.