Hi,
I came across the code below in a book on iphone development:
I dont understand the first line. I understand from the accompanying text in the book that numberOfRowsInSection is the name of the method, so I guess the rest of the line means that it accepts a NSInteger which it refers to as "section". But the first half of the line baffles me. Since the method returns a variable called "rows", I assume that is an integer so Im thinking the "NSInteger" at the beginning of the line specifies the return type. So what is the "tableview
UITableView *)tableView" part for? What does it specify?
Phil
I came across the code below in a book on iphone development:
Code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
[some code here]
return rows;
}
Phil