My ViewController Object must implement required Table View methods so it can act as a data source. From UITableView.h:
@required
-(NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section;
-(UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath;
This is a little confusing.
What is the first parameter, (UITableView *)tableView, and why does it have the same name as the method? It looks like a pointer to the TableView object. Why give it the same name as the method?
Secondly, I understand that while this appears like overloading, there are actually two methods, tableview:numberOfRowsInSection, and tableView:cellForRowAtIndexPath. Why is this?
The links below were helpful. Any additional help would be appreciated here, especially about the naming conventions.
Method overloading in Objective-C?
Is function overloading possible in Objective C?
How do I pass multiple parameters in Objective-C?