sizeToFit不像我们期望的那样工作

时间:2017-03-23 09:20:44

标签: ios objective-c uitableview uilabel sizetofit

我在2017中遇到form的奇怪问题。我在单元格中有一个标签,我想使用onSubmit,因为我会在文本后面移动UILabel

问题是第一次UITableView没有按预期工作,但经过一点点滚动后我的代码运行得很好。

在cellForRow中:

sizeToFit

两张照片更好理解:

First time, when size to fit works strange

滚动后,正确创建新单元格。 After scroll, when the new cells are created correctly.

0 个答案:

没有答案