I\'m using popoverPresentationController
to show my popover. The UITableViewController
used to show as popover is created programmatically and will usu
Override the preferredContentSize
property in your extension of the uitableviewcontroller
as following:
override var preferredContentSize: CGSize {
get {
let height = calculate the height here....
return CGSize(width: super.preferredContentSize.width, height: height)
}
set { super.preferredContentSize = newValue }
}
For calculating the height check out tableView.rectForSection(<#section: Int#>)