I am making a small application and would like a small popup to come in. What I currently have is the launch screen that displays when the user starts the application to which then I load in the home screen. At the moment the home screen looks exactly like the splash screen, but after a few seconds I would like a popup to appear with a menu layout (labels, buttons, etc.). I created a custom UIViewController with a view, a label, and a button on it. I then have the following code to call the popup:
// Create our popup window
LoginPopupView *popup = [[[LoginPopupView alloc] init] autorelease];
[self presentModalViewController:popup animated:YES];
This causes my home screen to rotate the background behind it and have the popup fill the fullscreen while the controls are also sideways. Both views are set to landscape mode and aside from this code snippet everything loads fine. It’s only after I added in this code that everything is sideways (commenting out the snippet returns the view back to normal).
Any help is greatly appreciated.
Could you check
shouldAutorotateToInterfaceOrientation:implementation inLoginPopupViewand make sure that it returns a value coherent with how you would like the view to be displayed?In your modal view controller
viewWillAppear, execute:this could fix an additional quirk that modal view controller may have with rotating.