Reputation: 1560
I have uitableview whoes cells are created in interfacebuilder and there is an image in it...now when the images are loaded on the imageview the uitableview scrolling is very choppy... here is some code
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (CustomCell *) currentObject;
break;
}
}
}
so now what can I do to make the scrolling less choppy?
thanks, TC
Upvotes: 1
Views: 1897
Reputation: 17918
First, make sure your custom UITableViewCell
and all of its subviews are set to be opaque, with solid backgrounds and and alpha channels set to 100%. Composting transparent views really hurts scrolling performance.
Second, your code doesn't show how your images are being loaded, but you should make sure they're being loaded asynchronously. Even loading images from the file system synchronously will kill your scrolling performance.
Upvotes: 2
Reputation: 3579
Check out this tutorial:
http://www.fieryrobot.com/blog/2008/10/01/glassy-scrolling-with-uitableview/
and this one, its the second part:
http://www.fieryrobot.com/blog/2008/10/08/more-glassy-scrolling-with-uitableview/
Upvotes: 0