UITableView scrolls choppy when the UITableViewCell is big

First, I know there are a few answers here on S.O. that addresses the choppy uitableview issue.

Some of them i applied in my code (namely the cell.layer.shouldRasterize = TRUE in particular as well as the cell queue caching thing). My choppiness is observed to be due to large cell rows (70 pixels height). If I change the row height to be 20, then it scrolls smooth as butter. But 30 and above, it gets choppy, especially when i "pull" and "let go" of the table so that it bounces back into place.

One thing that i am NOT doing is flattening the view (I am using the cell's Xib). Would doing away with the xib design view give me the performance boost that I need?

Also, any ideas why a 30+ pixel height cell row is causing such a drastic difference compared to the smooth-as-butter 20 pixel height?

Note: Even if i make everything in the cell xib to be hidden, i still get choppiness at 70 pixel height.

Answers


Check out the example from Apple - TableViewSuite. Look at the fifth example which shows hot to make a very fast cell with images and labels. Also note that cells created using xibs are much slower. So avoid subviews and perform custom drawing in drawRect method. Everything is shown in the apples example:

http://developer.apple.com/library/ios/#samplecode/TableViewSuite/Introduction/Intro.html


Need Your Help

Does the NSObject init method do anything?

objective-c initialization nsobject

Does it make sense to write self = [super init]; in a custom initialisation method while subclassing NSObject? I know it's necessary when subclassing any other class, because it might have a custom

Is there pointer in C# like C++? Is it safe?

c# c++ data-structures tree

I'm writing an application that work with a tree data structure. I've written it with C++, now i want to write it by C#. I use pointers for implementing the tree data structure. Is there a pointer ...