Reputation: 6462
See below - the tableView cells are getting cut off. Why doesn't this work? The width of the popover is 240.
(In a subclass of UITableViewController)
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.frame = CGRectMake(0,0,200,200);
}
Upvotes: 0
Views: 1913
Reputation: 1
Have you tried specifying the popover's content size?
i.e.
self.popoverController.popoverContentSize = CGSizeMake(400, 500);
I've found that while popover's are "suppose" to adjust to the appropriate size based on the content view controller, this doesn't always work as well as it should.
Upvotes: 0
Reputation: 11537
You have to specify the content size of the ui controller you are displaying. You can do it in 2 ways:
UIViewController* yourViewController = yourPopOverController.contentViewController; yourViewController.contentSizeInViewController = CGSizeMake(300, 600);
As you see the content ui controller is the one responsible of setting the size of your popover.
Upvotes: 1