Question

I have to show the data in modalViewController iPad. I have to present the viewController2 from viewController1 as ModalView for full screen. The viewController1 is in UITabbarController, the viewController2 should be hide the tabBar. So, i used this code to show the viewController2 from viewController1,

UIViewController *viewController2=[[UIViewController alloc] init];        
viewController2.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController: viewController2 animated:YES];

When i call this viewController2 in Landscape mode, the viewController shows half of the screen in viewController1. And also, the simulator automatically change to Portrait and automatically return to Landscape mode. What is the problem in this? Can anyone please help me to find the solution? Thanks in advance.

Was it helpful?

Solution

set the modelPresentationStyle UIModalPresentationCurrentContext. may be it will solve your problem. it solved my problem.

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