【发布时间】:2009-11-08 23:31:59
【问题描述】:
我似乎无法理解如何有条件地测试从 .plist 加载到 mutablearray 的布尔值。我只是不明白我应该做什么并继续收到错误:传递'numberWithBool:'的参数1:'从没有强制转换的指针中生成整数。感谢任何帮助理解这一点!
这是我的代码:
if ([NSNumber numberWithBool:[[self.ListArray objectAtIndex:indexPath.row] valueForKey:@"TrueFalse"]]) {
cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"IsSelected.png"]];
}
【问题讨论】:
标签: boolean nsmutablearray if-statement