UITableView show only first row

My app has 3 tabs (Kids, Points and Requests) with same result list. I'm using a custom cell to show kids information with same data in 3 tabs.

For example:

Kids Tab:

  • Kid name 1
  • Kid name 2
  • Kid name 3

Points tab:

  • Kid name 1
  • Kid name 2
  • Kid name 3

Requests tab:

  • Kid name 1
  • Kid name 2
  • Kid name 3

When I go to Requests and select a kid I push another view with total requests per selected kid. Now the VERY weird thing, when I back to Points or Kids tab and reload (i'm using pull to refresh, what is not the problem) only the FIRST row appear!

I'm using NSXML to parse the XML and adding to a NSMutableArray called itemList after this I populate the tableview.

What I already tried:

  1. tried to replace NSXML with TBXML parser without success the sameproblem occurs.

  2. tried to remove custom cells and use the default cell without success.

  3. tried to change the cell identifiers without success.

  4. tried to change all variables names trying to avoid variable replacement.

  5. NSLog in all vars and objs in app trying to show everything without success.

  6. tried to remove pull to refresh and same problem occurs.

All kind of help its appreciated :)

Thanks! Cleber Santos


The first thing you need to know is if this is a data problem or if this is a tableviewdelegate problem. I would start by swapping a static NSArray in place of your data source then re-running your app in the simulator. If it works as expected, then that means that the static data "worked" and the problem is your data source.

If the static NSArray data doesn't work, then that means your problem is with your tableView's delegate or (more likely) dataSource methods. If it turns out this is the case, then try to hunt it down and supply a code sample in a future post if you need help.

NOTE: Before you swap out your data source for the NSArray would be a good time to branch your source in Git/Subversion/whatever so that if it doesn't work with the static data you can pull back your changes. And DON'T TELL ME YOU'RE NOT USING SCM!!!!!

you need to make sure your data source is correct. The UITableView is just that, a view. You need to check that you actually have the data stored properly regardless of your view. My guess is that you clobbered your data when switching views.

Need Your Help

This class does not support SAAJ 1.3

glassfish jax-ws weblogic-10.x liferay-6 java-6

In trying to call a webservice from a portlet from Glassfish to a webservice hosted remotely on weblogic we are getting this error:

C# execute code on other thread

c# wpf multithreading unity3d

I have some trouble with threading in my application. I have a multi-threaded client/server application. I'm also using C# MonoDevelop for Unity3d. Not sure if it makes any difference for the answer.

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.