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!