0

Rather than for example doing this:

UILabel *lbl = [[UILabel alloc] init];

In the cellForRowAtIndexPath which I have discovered it VERY slow and can cause scrolling on your table view to stutter, where would I initialise my subviews such as labels?

4

1 回答 1

0

I believe it's better to do that in a subclass of UITableViewCell. By doing so, it will be recycled with the cell.

Besides, it could be useful to set UITableViewCell and, as much as possible, its subviews' opaque to YES.

Check this two posts for more information: 1, 2

于 2012-07-28T01:25:22.627 回答