我有这个:
NSArray *tags = [NSArray arrayWithObjects:
[NSNumber numberWithInteger:0],
[NSNumber numberWithInteger:1],
[NSNumber numberWithInteger:2],
[NSNumber numberWithInteger:3],
[NSNumber numberWithInteger:4],
[NSNumber numberWithInteger:5],
nil];
我很难尝试以int
或NSInteger
的形式访问每个项目。我该怎么办?
答案 0 :(得分:3)
致电intValue
NSInteger myInt = [[tags objectAtIndex:1] intValue];