Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UITableview单元格中的UITableview动态高度调整_Ios_Swift_Uitableview_Storyboard_Ios Autolayout - Fatal编程技术网

Ios UITableview单元格中的UITableview动态高度调整

Ios UITableview单元格中的UITableview动态高度调整,ios,swift,uitableview,storyboard,ios-autolayout,Ios,Swift,Uitableview,Storyboard,Ios Autolayout,我正在UITableviewCell中使用UITableview 我无法在UITableViewCell中设置UITableview的高度,但最初的高度无法根据UITableview的内容大小进行调整,但当UITableview重新加载或出列时,UITableViewCell中的tableview高度会自动调整 我想第一次调整这个高度 下面是我在tableviewcellForRowAtdelegate方法中查看的代码 cell.tableviewShow.register(UINib(nibN

我正在
UITableviewCell
中使用
UITableview

我无法在
UITableViewCell
中设置
UITableview
的高度,但最初的高度无法根据
UITableview
的内容大小进行调整,但当
UITableview
重新加载或出列时,
UITableViewCell
中的tableview高度会自动调整

我想第一次调整这个高度

下面是我在tableview
cellForRowAt
delegate方法中查看的代码

cell.tableviewShow.register(UINib(nibName: "Cell", bundle: nil), forCellReuseIdentifier: "Cell")
cell.tableviewShow.tag = indexPath.row

cell.tableviewShow.reloadData()
cell.layoutIfNeeded()
cell.heightOfTbleView.constant = cell.tableviewShow.contentSize.height
cell.tableviewShow.layoutIfNeeded()

对于单元使用中的动态高度:

tableView.rowHeight = UITableViewAutomaticDimension  
tableView.estimatedRowHeight = 60

您是否在
TableViewCell
内有
TableView
?@AmirKhan是的。他想调整外部tableview单元格的大小,以适应内部单元格的内容大小tableview@RajeshKumarR确切地