I am starting with ObjectiveC at the moment and wondering what this function definition means
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...
// access to tableView, is it a variable?
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
...
return cell;
}
I am wondering what is tableView and what does the part before the function name cellForRowAtIndexPath mean.
As i see from the example code, tableViewis a variable. But what does the (UITableViewCell *)tableView:(UITableView *)tableViewmean? I thought the return value is only before the function name?
Update 1 Maybe I should mention i am familiar with languages like c/c++, java, ...
Update 2 I am not interested in the meaning of the function or what its supposed to do, just the syntax and the definition of any function like that
tableViewis simply part of the function name (and it introduces the first parameter, which is theUITableViewinstance for which the delegate needs to supply the cell).tableView:cellForRowAtIndexPathright? Now how would i call that function manually