I have got TableView in the MainstoryBoard and the number of rows is random every time. I want the height of the whole TableView to be fl
TableView
MainstoryBoard
Use this for Swift 3
override func viewDidLayoutSubviews(){ tableView.frame = CGRect(x: tableView.frame.origin.x, y: tableView.frame.origin.y, width: tableView.frame.size.width, height: tableView.contentSize.height) tableView.reloadData() }