0
votes

I have a Master/Detail application and have a button on the top right of the MasterViewController in the split view that loads an "Info" view controller using a modal view:

popover in iOS 5.0

When the button is clicked, the view is loaded, and populates the entire screen in iOS 5.0 and below (this is the behavior that I want):

- (IBAction)showAppInfo:(id)sender 
{
    InfoViewController *infoViewController = [[InfoViewController alloc] 
        initWithNibName:@"InfoViewController" bundle:nil];
    infoViewController.delegate = self;
    [self presentModalViewController: infoViewController animated: YES];
}

modalView in iOS 5.0

However, when I run this in the iOS 5.1 simulator, it no longer populates the entire iPad screen, and only populates what's inside the Master View:

modal view in iOS 5.1

What can I do to make this InfoViewController populate the entire screen in iOS 5.1 as it did before?

1

1 Answers

0
votes

I assume you are using UIPopoverController, try this

InfoViewController *infoViewController = [[InfoViewController alloc] 
    initWithNibName:@"InfoViewController" bundle:nil];
UIPopoverController *popoverController      =   [[UIPopoverController alloc] initWithContentViewController:infoViewController];
    popoverController.popoverContentSize        =   CGSizeMake(500.0, 583.0);
    popoverController.delegate                  =   self;
    [popoverController presentPopoverFromRect:sender.bounds inView:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];