Detected a case where constraints ambiguously suggest a height of zero

后端 未结 23 727
猫巷女王i
猫巷女王i 2020-12-07 09:31

After updating to Xcode 6.1 beta 2 when I run my app that contains tableview cells, the debug assistant says:

Warning once only: Detected a case where constr         


        
23条回答
  •  遥遥无期
    2020-12-07 10:20

    I got this Warning today All I did is just added one extra line to my code

    tableView.rowHeight = 200;
    

    add this line of code inside the

    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {
      ...
    }
    

    and the final code look like

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
      tableView.rowHeight = 200;
      ...
    }
    

    this code will increase the table Row cell height to 200 the default height is 44

提交回复
热议问题