I'm using a UIPopoverPresentationController on my app to show a popover on my iPhone (with UIModalPresentationNone). I want the size to be dynamic with the height of the UITableView, but i can't find out how to do that. The size of the popover is the same on every device.
In the class, that you present in popover add a code:
- (void)viewDidLayoutSubviews {
self.preferredContentSize = CGSizeMake(320, tableView.contentSize.height);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With