См. Код ниже. Почему доступ к [self.objects count] выдает эту ошибку, когда строка непосредственно перед ним доказывает, что self.objects существует?
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
NSLog(@"HERE: %@", self.objects); //this logs the array - no error
NSLog(@"num rows: %@", [self.objects count]); //this line throws the error
return [self.objects count];
}
в файле .h у меня есть это:
@interface YouTubeViewController_iPad : UITableViewController
{
NSArray *_objects;
}
@property (nonatomic, retain) NSArray *objects;
и в файле .m:
@synthesize objects = _objects;