i\'m making a navigation based application for iphone.
one of my view controllers looks like this:
@interface NewComputerViewController : UIViewContr
[tableView reloadData]; where tableview is the name of your UITableView
When even reloading...
[tableView reloadData];
will not reload the edited rows/cell, maybe the IBOutlet of tableView is not connected in XIB file?
This could be one of the reasons.
at the end of your function loadstuff reload the contents of ur table by writing the following code:
[tableView reloadData];
Very important is the fact, that you need to make sure, that the source of your tableview reflects your changes too.
When you i.e. remove something, [tableView reloadData] won't do anything when you do not delete the item in your source first.
I had this issue in following situation: I had a tableview which showed some files in my document folder. Then I wanted to delete some files and I deleted them in the documents-folder, but they still appear in my list. I tried [tableView reloadData] and all other suggested answers in this post, but there were still the files listed. When I closed the tableview and opened it again, then the list was fine. Why? Well, because I filled an NSArray with all my files -> this is my "source" for the tableView. So when I delete a file, I do not only need to delete the file in the documents-folder, I need to remove it from the array too. -> So I made an NSMutableArray to have the ability to remove it. Then call [tableView reloadData] and the list is fine. ;-)
Try using [tableView reloadData]; (where tableView is the name of your instance variable)
You can always use [tableView reloadData] method!
But if you have some data stored locally and loading new stuff from some server then you can go for:
[tableView beginUpdates];
[tableView insertRowsAtIndexPaths:*arrayOfIndexPaths* withRowAnimation:*rowAnimation*];
[tableView endUpdates];
And if you want to delete existing row you can use
[tableView beginUpdates];
[tableView deleteRowsAtIndexPaths:*arrayOfIndexPaths* withRowAnimation:*rowAnimation*];
[tableView endUpdates];