I\'m using popoverPresentationController to show my popover. The UITableViewController used to show as popover is created programmatically and will usu
popoverPresentationController
UITableViewController
Checkout the preferredContentSize property of UIViewController:
let height = yourDataArray.count * Int(popOverViewController.tableView.rowHeight) popOverViewController.preferredContentSize = CGSize(width: 300, height: height)