阅读背景:

UITableView cell.contentView.bounds.size.width使用单元重用进行更改

来源:互联网 

I use cell.contentView.bounds.size.width to calculate the position of a text field in a UITableView cell. When the cell is created, debug code reports the width as 302. When the cell scrolls off the screen and then back on, the debug code reports that the it is 280--every time. It doesn't seem to want to go back to 302 and stays stuck at 280. The net result is that the text field gets put in the wrong place the second time the field is put into the cell's contentView, though it was put in the right place the first time. to cal




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: