У меня проблема с просмотром таблиц в iphone. Я не могу понять, почему он вылетает каждый раз, когда вот код
- (void)viewDidLoad
{
[self checkAndCreatePList];
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:pListPath];
self.animals = [plistDict objectForKey:@"Animals"];
[super viewDidLoad];
}
-(UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *) indexPath
{
static NSString *SimpleTableIdentifier =@"SimpleTableIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];
if(cell== nil){
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:SimpleTableIdentifier]autorelease];
}
NSUInteger row = [indexPath row];
cell.textLabel.text = [animals objectAtIndex:row];
return cell;
}
, он вылетает в строке cell.textLabel.text = [животные objectAtIndex: row];и сообщает мне, что завершение приложения из-за необработанного исключения «NSInvalidArgumentException», причина: '- [__ NSCFDictionary objectAtIndex:]: нераспознанный селектор, отправленный на экземпляр