views:

230

answers:

1

I'm currently trying to fix the performance of my UITableView. Basically all it is is a custom UITableViewCell with a UIImageView.

At the moment, this image is loaded in the tableView:willDisplayCell: method, however the performance is pretty bad so I decided to try and load the image asynchronously using an NSThread, but this results in the UITableView looking really weird (it jumps all over the place and loads the images oddly).

Does anybody have the best way to load images in UITableViewCells?

A: 

Have you tried loading it in

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

and making it a reusable cell?

mahboudz
Figured out that I wasn't reusing the cells properly. Moving it to - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath also helped. Thanks!
Alastair