0

我有这个:

  NSArray *tags =  [NSArray arrayWithObjects:
                       [NSNumber numberWithInteger:0],
                       [NSNumber numberWithInteger:1], 
                       [NSNumber numberWithInteger:2],
                       [NSNumber numberWithInteger:3],
                       [NSNumber numberWithInteger:4],
                       [NSNumber numberWithInteger:5],
                       nil];

而且我很难尝试将每个项目作为intor访问NSInteger。我该怎么办?

4

1 回答 1

3

称呼intValue

NSInteger myInt = [[tags objectAtIndex:1] intValue];
于 2012-05-11T17:04:31.547 回答