开发者

UITableView resizing rows problem

开发者 https://www.devze.com 2022-12-22 12:09 出处:网络
Hope to get solution to this problem. I have been stuck on it since a long time now. I have a a tableView which has custom labels drawn upon the cell using CGRect. I receive the data from a web servi

Hope to get solution to this problem. I have been stuck on it since a long time now.

I have a a tableView which has custom labels drawn upon the cell using CGRect. I receive the data from a web service in arrays. Initially i display a line of data on the cells. When the user selects a cell, I call reloadsRowAtIndexPath to increase the height of selected row. In the process, cellForRowAtIndexPath gets called again. I keep track of this by a flag, and when cellForRowAtIndexPath gets called again, I display the two m开发者_StackOverflow社区ore lines of data from arrays, on the cell.

What i am getting is all overlapping data on one other. I tried to remove already placed labels in didSelectRowAtIndexPath, but to no avail.

Please help me on this

Thanks in advance.


In your cellForRowAtIndexPath method, when the selected row height needs to increase, do you create a new UITableViewCell object or change an already allocated one?

Please can you post your cellForRowAtIndexPath method code to help track this down?

0

精彩评论

暂无评论...
验证码 换一张
取 消