title: Can't save UIPickerView value in NSUserDefaults
body: <p>Have <code>UIPickerView</code> with two rows. Trying to save value of each row in <code>NSUserDefaults</code>. Didn't used before <code>NSUserDefaults</code>. Here is my code:</p>
  
  <pre><code>-(void)viewWillAppear: (BOOL) animated {
      NSUserDefaults *defaultsPicker = [NSUserDefaults standardUserDefaults];
      picker = [defaultsPicker objectForKey:@"picker"] ;
  }
  
  - (void)viewDidLoad {
  
      NSArray *ar1 = [NSArray array];
      for (int i = 150; i &lt;= 210; i++)
          ar1 = [ar1 arrayByAddingObject:[NSString stringWithFormat:@"%d",i]];
      [ar1 retain];
      self.array1 = ar1;
  
      NSArray *ar2 = [NSArray array];
      for (int j = 40; j &lt;= 130; j++)
          ar2 = [ar2 arrayByAddingObject:[NSString stringWithFormat:@"%d",j]];
      [ar2 retain];
      self.array2 = ar2;
  
  
      [super viewDidLoad];
  
  }
  </code></pre>
  
  <p>And NSUserDefaults is in IBAction</p>
  
  <pre><code>-(IBAction)calculate {
      NSUserDefaults *defaultsPicker = [NSUserDefaults standardUserDefaults];
      [defaultsPicker setObject:[NSNumber numberWithInt:[picker selectedRowInComponent:0 ]] forKey:@"picker"];
      [defaultsPicker synchronize];
  
      //bla bla
  }
  </code></pre>
  
  <p>When I press the button, app crashes and log is:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFNumber selectedRowInComponent:]: unrecognized selector sent to instance 0x690df40'
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>#pragma mark -
  #pragma mark Picker Data Source Methods
  - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
  {
      return 2;
  }
  - (NSInteger)pickerView:(UIPickerView *)pickerView
  numberOfRowsInComponent:(NSInteger)component {
      if (component == secondArrayComponent) {
          return [self.array2 count];
      }else {
          return [self.array1 count];
      }
  }
  
  
  #pragma mark Picker Delegate Methods
  - (NSString *)pickerView:(UIPickerView *)pickerView
               titleForRow:(NSInteger)row forComponent:(NSInteger)component {
      if (component == secondArrayComponent) {
          return [self.array2 objectAtIndex:row];
      }else {
          return [self.array1 objectAtIndex:row];
      }
  }
  </code></pre>