Detected a case where constraints ambiguously suggest a height of zero

后端 未结 23 707
猫巷女王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条回答
  •  -上瘾入骨i
    2020-12-07 10:10

    I too experienced this warning with moving to Xcode 6 GM. I was only getting the warning when I rotated the device back to its original position.

    I am using custom UITableViewCells. The storyboard table view is set to my custom size (100.0 in my case). While the table cells render properly as they have in previous releases, I did not like warning message.

    In addition to the above ideas, I added this

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
        return 100.0;
    }
    

    Screen renders... responds to rotation and no more warning messages.

提交回复
热议问题