IPhone UITableView stutters with custom cells. How can I get it to scroll smoothly?

Maybe this blog entry from atebits (creators of Tweetie) can help you: blog.atebits.com/2008/12/fast-scrolling-... Cutting to the chase, here’s the secret: One custom view per table cell, and do your own drawing. Sounds simple? That’s because it is.

It’s actually simpler than dealing with a ton of subviews of labels and images, and it’s about a bzillion times faster (according to my informal tests).

Maybe this blog entry from atebits (creators of Tweetie) can help you: blog.atebits.com/2008/12/fast-scrolling-... Cutting to the chase, here’s the secret: One custom view per table cell, and do your own drawing. Sounds simple? That’s because it is.

It’s actually simpler than dealing with a ton of subviews of labels and images, and it’s about a bzillion times faster (according to my informal tests).

Note that this implementation ("drawing directly") requires you to think carefully about accessibility features, which you get for free by using UILabels. – Alfons Mar 27 '10 at 13:01 I didn't have the cell identifier set to TwitterCell in IB so that gave me a noticeable improvement... but I think this implementation is definitely the best way to get optimal performance. Thank you!

– Charles S. Mar 27 '10 at 18:08.

Couple things: Make sure the cell's identifier in IB matches what you're looking for in the cellForRowAtIndexPath method Unlikely to be the culprit, but a performance tweak nontheless, cache the "Tweet" that you pull out to avoid the (small) cost of grabbing that out of the NSArray.

You'll probably find a lot of speedup by not loading nibs and creating your custom cells completely in code instead. Otherwise you'll need to do some profiling to figure out where any hidden slowdowns are lurking.

Drive-by negs suck. – Shaggy Frog Mar 26 '10 at 22:33.

I'm using a UITableView to display custom cells created with Interface Builder. The table scrolling isn't very smooth (it "stutters") which leaves me to believe cells aren't being reused. Is there something wrong with this code?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions