views:

600

answers:

1

How would I get an integer value out of an NSMutableArray?

+10  A: 

You'll need to use NSNumber:

myArray = [NSMutableArray arrayWithCapacity:0];
[myArray addObject:[NSNumber numberWithInt:1234]];

//..

int theNumber = [[myArray objectAtIndex:0] intValue];
e.James