听起来像个愚蠢的问题。我正在尝试从定义为NSNumber的变量中检索内容,该变量是从mutableArray中读取的:
NSNumber * nsnMoneyPerMonth;
nsnMoneyPerMonth=[[[myTableData objectAtIndex:0] objectAtIndex:myIndexPath.row]objectForKey:@"moneyPerMonth"];
int moneyPerMonth=sqlite3_column_int(statement, 1);
NSNumber *nsnumberMoneyPerMonth=[NSNumber numberWithInt:moneyPerMonth];
[NSMutableDictionary alloc]initWithObjectsAndKeys:nsnumberMoneyPerMonth,@"moneyPerMonth"
现在,一切都很好。但是,当我添加一行代码时:
int intMoneyPerMonth=[nsnMoneyPerMonth intValue];
尝试检索内容,抛出EXC_BAD_ACCESS。
那么,我做错了什么?