Reduce Choppy Scrolling in Objective-C

1k views Asked by At

I know this is kind of a vague question, but does anyone know how to get rid of choppy scrolling on a tableview?

Thanks

4

There are 4 answers

0
kwcto On

I suggest reading up on the subject but a few main things are:

  1. Don't do heavy calculations in your GetCell function (it is calculated several times per second as each row appears.
  2. Make sure as many elements in the cell are "opaque" as possible. Read about red/green transparency checking with instruments / simulator. Transparent areas require compositing which causes a performance hit with the hardware (especially on iPhone/3G).
  3. Make sure you are using a constant cell identifier so dequeueReusableCellWithIdentifier isn't creating a new cell every time one is needed.
0
Kris Markel On

Have you tried Apple's suggestions for Cells and Table-View Performance yet?

You might also want to look at the TableViewSuite sample code for different techniques for creating fast scrolling table views.

0
Jasarien On

Try Atebit's fast scrolling table cells:

http://news.atebits.com/post/197580827/fast-scrolling-in-tweetie-with-uitableview

The idea is that instead of a deep hierarchy of subviews you draw everything flat to the content view so that rendering doesn't have to composite lots of transparency.

0
Kendall Helmstetter Gelner On

Another possible problem may be background web calls - if you are using asynchronous calls to servers, try moving them into background threads. That can really improve UI performance.