I have a UIViewController
that contains a UITableView
.
This UIViewController
is being displayed in a UIPopoverController
.
Now, the things is that the number of items in the tableView
is not constant, and I want the size of the popover (that is - the popoverContentSize
), to adjust according to the number of items in the tableView
Naively, I was thinking that if I'll set the contentSizeForViewInPopover
in viewDidLoad
after I'm loading the tableView
with all the items - It'll do it.
It didn't.
So the make it short, my question is: How can I change the popoverContentSize
directly from the contentViewController
- after it's been presented?
Appendix:
See Question&Answers more detail:os