cell.theTitle.font=[UIFont fontWithName:@"Helvetical Bold" size:14];
cell.theTitle.text =[NSString stringWithFormat:@"%@",theCellData.contentTitle];
cell.theDescriptionLabel.text=theCellData.contentTitle;
cell.theDateAdded.text=[NSString stringWithFormat:@"Added: %@",theCellData.contentAddedDateTime];
NSString*type=theCellData.contentType;
NSLog(@"type is %@",type);
if ([type isEqualToString:@"Video"]) {
[cell.theCellImageButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"Video icon.png",indexPath.row]] forState:UIControlStateNormal];
}
else if ([type isEqualToString:@"Audio"]) {
NSLog(@"Audio");
[cell.theCellImageButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"Sound icon.png",indexPath.row]] forState:UIControlStateNormal];
}
else {
[cell.theCellImageButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"20.png",indexPath.row]] forState:UIControlStateNormal];
}
[cell.theCellImageButton addTarget:self action:@selector(imageButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[cell.theCellImageButton setTag:indexPath.row];
return cell;
这是崩溃日志
类型是音频 2013-06-14 16:09:50.071 ProductivoApp[6516:c503] 音频 2013-06-14 16:09:50.076 ProductivoApp[6516:c503] -[NSNull isEqualToString:]:无法识别的选择器发送到实例 0x125adc8 2013 -06-14 16:09:50.079 ProductivoApp[6516:c503] *由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[NSNull isEqualToString:]:无法识别的选择器发送到实例 0x125adc8”