0
votes

I am migrating my app code base to iPhone SDK 4. In one of the screens I use

-(IBAction) LoadSearch {

MySearchViewController *mySearchController=[[MySearchViewController alloc] initWithNibName:@"MySearchViewController" bundle:nil];

[self.navigationController presentModalViewController:mySearchController animated:YES];

}

That launches the ModalViewController. While the Modal is open, if the user clicks home button, the application goes to suspended state.

If I relaunch the application, immediately after launch the Modal becomes invisible. It seems like the Modal goes to the background of navigationController views.I can see the modal when I rotate the iphone to landscape mode (the modal is being rotated appropriately).

Has any one seen this issue before? Any suggestions are appreciated.

1

1 Answers

0
votes

Solved this issue my self.

I was calling the [window addSubview:tabBarController.view] in applicationDidBecomeActive.

So, this resulted in adding tabBarController.view to the window and any modalViewControllers are pushed to background.