Objective-c – tableView reloadData doesn’t work


For some reason, [self.tableView reloadData]; just wont work.
In my .h file I have:

@interface SearchOptions : UIViewController <UINavigationBarDelegate, UITableViewDelegate, UITableViewDataSource> 
    IBOutlet UITableView *myTableView;

I've tried:

[self.tableView reloadData];


[self.myTableView reloadData];

Any ideas what might be happening?

Best Solution

Check that you’ve correctly bound your outlet in Interface Builder (check myTableView is not nil). If that’s not it, are you getting the initial data in your table view? If not, then it probably means you haven’t set your SearchOptions instance as the data source for your table—check this in Interface Builder and stick some break points on the data source methods.

Related Question