I have these delegate method for a tableview inside a class:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)ta
My suggestion is having your data source act as a table view delegate, instead of your controller.
This is a design more closer to the Model-View-Controller pattern and will allow you much more flexibility and avoid checking for the specific value that the tableView
argument has got in your delegate methods.
In your case, your delegate/data source would be a class with a member of type NSArray
and also implementing the UITableViewDelegate
protocol.