IPad Full Screen Modal View via TabBarController?

Is there a TabBar-based app on the iPad that has a modal on top of it in "FullScreen"?

I have ONLY LANDSCAPE APPLICATION (if that matters), and the element that I want to present is currently modal, I would like to present a full screen, filling out the entire screen to clarify. I can present it in “PageSheet” in order, and “FormSheet” in order, after several settings of buttons in the modal view, but as soon as I try “FullScreen” the background will turn white (TabBar is still there) and if I try to click button (without restarting the simulator), it will not respond.

The view in which the button for presenting the modal view is located is CountryViewController.m and has the action:

-(IBAction) showNewModal:(id)sender {
modalContent.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
modalContent.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:modalContent animated:YES];
}

This code works fine without TabBar, I get it. I was looking for a watch to add something to this code or even to the AppDelegate.h and .m files, but so far it has either not responded (oddly enough, without showing errors), or the aforementioned empty space.

+3
source share
1 answer

In my experience, the problem arises from the presentation of modal code from the wrong controller.

[self.tabBarController presentModalViewController:modalContent animated:YES];

must work

If you are running iOS 4 (possibly), beter options should use:

[[UIApplication sharedApplication].keyWindow.rootViewController presentModalViewController:modalContent animated:YES];
+6
source

All Articles