title: Get Integer value from NSNumber in NSArray
body: <p>I have an NSArray with NSNumber objects that have int values:</p>
  
  <pre><code>arrayOfValues = [[[NSArray alloc] initWithObjects: [NSNumber numberWithInt:1], [NSNumber numberWithInt:3], [NSNumber numberWithInt:5], [NSNumber numberWithInt:6], [NSNumber numberWithInt:7], nil] autorelease];
  [arrayOfValues retain];
  </code></pre>
  
  <p>I'm trying to iterate through the array like this:</p>
  
  <pre><code>int currentValue;
  for (int i = 0; i &lt; [arrayOfValues count]; i++)
  {
      currentValue = [(NSNumber *)[arrayOfValues objectAtIndex:i] intValue];
      NSLog(@"currentValue: %@", currentValue); // EXE_BAD_ACCESS
  }
  </code></pre>
  
  <p>What am I doing wrong here?</p>