iOS5: UITableView poor scrolling performance

First of all I am getting memory leak while scrolling tableview out of bounds. The same issue as here.

Also, my scroll is fast enough but it 'kind of trembles' while I scroll it. The cells are reusable.


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    static NSString *CellIdentifier = @"Cell";

    Country *country=[[self.items objectAtIndex:[indexPath section]] objectAtIndex:[indexPath row]];
    CountryCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    cell.imageView.image=[UIImage imageNamed:country.countryFlag];

    return cell;

App: iOS 5, ARC, Storyboard.

What can be the real reason of this tableView behavior and how to fix it ?


If your scrolling is poor in the device, you probably haven't configured your subviews correctly in the prototype. You aren't doing anything expensive in your method above.

Use the Core Animation instrument (device only) - check your frames per second when scrolling. You want as close as 60fps as possible.

Turn on "color blended layers" - anything drawn transparent will be highlighted in red. You want to remove all transparency, if possible, from your cells, and make them all green. This may simply be a matter of setting background colours and the opaque flag correctly in your prototype subviews.

If your images are not the same size as your image view, then you will be resizing every time a cell appears, this is an expensive operation as well.

Need Your Help

Facebook IOS SDK FBWebDialog

ios facebook

I am experiencing an awkward behavior with FBWebDialog while showing the dialog itself for inviting users to my application (apprequests).

How set dynamic size for input queue on Solaris?

c unix terminal solaris

I read from terminal by fgets with size of buffer 80 bytes. But when I write very long line in terminal (more than MAX_INPUT constant from limits.h) then terminal rings me BEL sound (IMAXBEL is ena...