Question

i am using a tabbarcontroller in my app and also want to use a loginview. I have an LoginController which handles the loginprocedure. I am presenting the loginView modally.

[self.tabbarcontroller presentModalViewController:loginView animated:NO];  

And on other point i am dismissing it(after login is successfull):

[self dismissModalViewControllerAnimated:YES];  

After dismiss i have just a blank screen. Thats the blank window in my MainWindow.xib, i have checked it with a testlabel.

Throubles with that. No ideas how to solve this issue.

Was it helpful?

Solution

Two things:

  1. The self.tabbarcontroller should not be instantiating the modal view. It should be the initial view controller that the tabbar controller controls. In the initialization of that view controller, you check for a login session and present the login VC.

  2. Make sure you are dismissing that modal VC you created in the method that presented it. You should have a delegate method for your Login VC (something like loginFinished) that is handled in the VC that presented it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top