title: Unable to set 'int' in CoreData as NSNumber
body: <p>I have an attribute that is described as Int16.  It is described in the .h file as NSNumber.  No matter how I format it, I can't seem to get the valid value of either 12 or 24 stored in UserDefaults.  What am I doing wrong?  or, better yet, how do I fix this so <em>aHourFormat</em> is the same as <em>timeFormat</em>?</p>
  
  <p>This is the code:</p>
  
  <pre><code>updateData.aHourFormat = [NSNumber numberWithInt:[preferencesDict objectForKey:@"timeFormat"]];
  NSLog(@"\ntimeFormat: %d\naHourFormat: %d",[[preferencesDict objectForKey:@"timeFormat"]intValue],[updateData.aHourFormat intValue]);
  </code></pre>
  
  <p>This what NSLog displays in the debug console:</p>
  
  <blockquote>
  <pre><code>timeFormat: 12
  aHourFormat: -30496
  </code></pre>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
  <pre><code>timeFormat: 24
  aHourFormat: 14000
  </code></pre>
  </blockquote>
  
  <p>This is the definition of <em>aHourFormat</em>:</p>
  
  <pre><code>@property (nonatomic, retain) NSNumber *aHourFormat;
  </code></pre>