TableView Automatic Dimension Tableview Inside Tableview

前端 未结 4 2046
慢半拍i
慢半拍i 2020-12-19 12:47

I have Tableview for showing food orders placed by clients. which contains Horizontal UIStackview. In UIStackView

In UIStackview

4条回答
  •  悲&欢浪女
    2020-12-19 13:43

    Add these 2 lines before the end of cellForRowAt in main & inner tableViews

      cell.layoutSubviews()
    
      cell.layoutIfNeeded()
    
      return cell
    

    Also you may try add layoutSubviews method in main cell subclass and do this

      self.tblOrderMaster.layoutIfNeeded()
    

    and in viewDidLayoutSubviews of controller of the main tableView and do this

      self.tblOrders.layoutIfNeeded()
    

提交回复
热议问题