I am studying a master data tutorial and am confused about the lines of the following code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
id <NSFetchedResultsSectionInfo> sectionInfo = [self.fetchedResultsController sections][section];
return [sectionInfo numberOfObjects];
}
As I know, NSFetchedResultSectionInfo is a protocol, but a protocol is a list of methods defined in the class header. I donβt understand what is going on here, what is the meaning of double square brackets [..][..];?
Perhaps this is a new modern objective-c syntax that I did not know would be nice if someone could explain this more clearly to me, thanks.
source
share