Modal view controller's frame size is not correctly assigned when it is launched from an UIPopOverController?

You do not want the view controller inside of a UIPopoverController to present a modal view controller. Instead, you most likely want your window's root view controller to present it. How you get at the appropriate view controller is up to you.

Here is one way to do it.

Up vote 1 down vote favorite share g+ share fb share tw.

I am implementing an in app browser which acts as a browser and it is presented modally from an UIViewController. My issue is particularly in case of iPad. I launch the browser control from a view controller on the root view controller or detail view controller of a split view controller.

When I launch from detail or root view controller everything works as expected. But when I launch the browser controller from a view controller on the UIPopOver controller the browser's frame goes out of bound in landscape mode, but in case of portrait mode it works as expected. Can you help me?

What am I doing wrong? Here is the code:- BrowserController *browserController = BrowserController alloc init; self presentModalViewController:browserController animated:YES; ipad uipopovercontroller link|improve this question edited Dec 12 '11 at 13:42edorian12.2k12353 asked Dec 12 '11 at 13:10Salil godbole71.

You do not want the view controller inside of a UIPopoverController to present a modal view controller. Instead, you most likely want your window's root view controller to present it. How you get at the appropriate view controller is up to you.

Here is one way to do it: id delegate = UIApplication sharedApplication delegate; UIViewController *rootViewController = delegate window rootViewController; BrowserController *browserController = BrowserController alloc init; rootViewController presentModalViewController:browserController animated:YES; browserController release.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions