【发布时间】:2014-12-09 00:51:00
【问题描述】:
在尝试调试 AutoLayout 问题时(在某些情况下,应该根据其内容大小而不是增长的表格单元格),我在 tableView:heightForRow: 方法的最后一行设置了一个断点,并且试图打印systemLayoutSizeFittingSize: 的值我明白了:
(lldb) p ((CGSize)[cachedCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]).height
2014-10-14 11:15:49.492 AppName[72132:10302054] This NSLayoutConstraint is being configured with a constant that exceeds internal limits. A smaller value will be substituted, but this problem should be fixed. Break on void _NSLayoutConstraintNumberExceedsLimit() to debug. This will be logged only once. This may break in the future.
(CGFloat) $0 = 57
好吧,这很有趣。但我尝试按照它所说的去做,并在该函数上设置一个断点:
...而且这个断点没有被命中。
- 我是否正确设置了断点?
- 无论如何,有什么线索可以说明我的约束可能有什么问题导致这种情况?
(令人讨厌的是,它似乎在某些情况下有效,但在其他情况下无效,我看不出设置有什么不同。)
【问题讨论】:
标签: ios uitableview autolayout breakpoints lldb