1

I'm facing strange issues when presenting a popover, I want to set the size of the popover and resize it manually after the keyboard appear. I'm facing issues in the first step, where I'm presenting the popover:

- (void) showPopover:(id)sender {
    if (!self.detailPopoverController) {
        TableViewController* tvc = [[TableViewController alloc] init];
        tvc.contentSizeForViewInPopover = CGSizeMake(500, 500);
        self.detailPopoverController = [[[UIPopoverController alloc] initWithContentViewController:tvc] autorelease];
        self.detailPopoverController.popoverContentSize = CGSizeMake(500, 500);
        [tvc release];
    }
    [self.detailPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
}

I set the size in two way to 500*500, but the popover will be 500 wide, but the height is only 247.

<UITableView: 0x7969e00; frame = (0 0; 500 247); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x7192660>; layer = <CALayer: 0x7197340>; contentOffset: {0, 0}> 

How can I set the size of the popover and how can I resize it without presenting again?

Thanks for any help!

Dave
  • 1,081
  • 6
  • 10
  • 2
    check this other [question](http://stackoverflow.com/questions/2752394/popover-with-embedded-navigation-controller-doesnt-respect-size-on-back-nav) and the answers – tkanzakic Nov 28 '12 at 15:16
  • Thanks, it helped me to solve the issue. – Dave Nov 28 '12 at 15:35

0 Answers0