根据目录动态自动调整高度UITableView
。 我尝试以下解决方案,但我没有工作:SWIFT UITableview根据内容设置自动高度 - Xcode - iOS
dispatch_async(dispatch_get_main_queue()) {
//This code will run in the main thread:
CGRect frame = self.tableView.frame;
frame.size.height = self.tableView.contentSize.height;
self.tableView.frame = frame;
}
什么,如果2个不同的表视图在一个控制器上存在吗? – Mina