I had a similar problem, but the solution was not associated with the numberOfRowsInSection: method as Xcode was pointing too.
Instead, the overriding problem was that I had not set my UIViewController's Custom
Class setting... In my case it was empty instead of having a valid class name like "DetailsVC2" in the example image below. Once I corrected this issue the usual numberOfRowsInSection: operation is recognized and called correctly.
Typically, you want to return the count of an array (e.g. tableData), but in my very simple case I returned the value of 1.
NSArray *tableData; // Defined somewhere above, and populated prior to the viewDidAppear() operation
.
.
.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1; // or tableData.count;
}
