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

Export array of objects into Excel using Javascript

javascript arrays excel

I'm writing a client side method, that creates an array of objects.I open an existing excel to write the values from the array. I get the values using getProperty and store in a variable.

Roguelike game has blinking drawing

java drawing ascii game-engine roguelike

I'm writing the drawing system for a roguelike game based on ascii characters (graphics similar to dwarf fortress). I'm using the AsciiPanel from here. My problem is that when I draw entities on my...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.