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, tableView
is a variable. But what does the (UITableViewCell *)tableView:(UITableView *)tableView
mean? 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