I'm facing a strange error in my iOS app and haven't been able to figure out the reason why.
In my UITableView i can add new cells, so i refresh the array that is the datasource and call reloadData.
Everything works without error. The numberOfRowsInSection is called again, and it's value is one more than it's previous value was. The new cell even gets inserted at the bottom of the tableview, but i cant scroll down to it. I only know that it's there because the tableview bounces and i can see it.
I'm guessing the tableview's content height is not getting increased for some reason, but i have no idea why.
I'm using iOS 6 btw.
Any help is very much appreciated!
Thanks,
Zoli
EDIT, answers for Srikanth's questions:
How is data getting added.
There's an NSArray containing objects of a specific type. The array.count is the number of the number of cells. This NSArray gets its values from a database query.
When you say, you are refreshing the array, what do you mean.
By refreshing the array i mean i execute a new query in the database and put the results of this query into an NSArray. this will be the tableview's datasource array. Like this:
dataSourceArray = [dbManager executeQuery];
[tableView reloadData];
Are you adding the data within the same view controller
Yes.
Can you show some code as to what you are doing
See above.
Is the table view at the root of the view controllers view or is it within another view
The tableview is the main view's first child.
Can you try adding data to the array at the beginning, so that you can view the cell being added at the top.
I don't understand what you mean.