Reputation: 455
I'm new to iPhone development. I'm working on a table view (default UITableView subclass) that contains complicated custom cells, with multiple subviews and controls. Scrolling is not very smooth, but I'll just leave that for now.
The question is, when I'm scrolling the table view with quick swipes, the table sometimes suddenly stops scrolling and the scroll indicator will not disappear, and I have to swipe again to make it scroll.
If the table contains very few rows, say, 5 or 6, it never stuck. The custom cell class I used is from the example provided here: http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/
Can anyone give a hint or solution to this problem? Thanks in advance.
Upvotes: 3
Views: 3144
Reputation: 71880
NSLog( @"Cell loading" );
in your cell creation code and check the console to see this happen as you scroll. table cells
? If there's any performance slow downs you should probably not have that happen while creating cells. Upvotes: 1
Reputation: 11
For posterity, and only valid if you are using Unity-iphone: this problem was driving me insane and I fixed it with the suggestion in this post:
Changing the preprocessor flag to
#define USE_DISPLAY_LINK_IF_AVAILABLE 0
gave the issue a happy ending.
Upvotes: 1
Reputation: 9507
I'd take a look at your cellForRowAtIndexPath method - for a couple of possible problems.
If you aren't using the cell reuse that will slow things down a lot and if you are re-allocating or re-initializing your custom cells in the cellForRowAtIndexPath delegate method that can cause big performance issues.
If you post your code for that method we can give you some hints as to what might be causing it.
Upvotes: 0