title: Retrieving an int from NSUserDefaults
body: <p>How do I retrieve an int from NSUserDefaults?</p>
  
  <p>I have the following code</p>
  
  <pre><code>NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
  NSArray *prefs = [def arrayForKey:@"addedFavs"];    
  favList = [[NSMutableArray alloc] initWithArray:prefs];
  </code></pre>
  
  <p>If I try this</p>
  
  <pre><code>NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
  int tempInt = [def objectForKey:@"addedFavs"];  
  </code></pre>
  
  <p>will I not need to do type casting?</p>