title: xcode update NSMutableArray
body: <p>I have a global NSMutableArray and I need to update it with values.  NSMutableArray is defined in the .h as follows;</p>
  
  <pre><code>@property (strong, nonatomic) NSMutableArray *myDetails;
  </code></pre>
  
  <p>In the viewDidLoad pre-populate like this;</p>
  
  <pre><code>    NSDictionary *row1 = [[NSDictionary alloc] initWithObjectsAndKeys:@"1", @"rowNumber", @"125", @"yards", nil];
      NSDictionary *row2 = [[NSDictionary alloc] initWithObjectsAndKeys:@"2", @"rowNumber", @"325", @"yards", nil];
      NSDictionary *row3 = [[NSDictionary alloc] initWithObjectsAndKeys:@"3", @"rowNumber", @"525", @"yards", nil];
  self.myDetails = [[NSMutableArray alloc] initWithObjects:row1, row2, row3, nil];
  </code></pre>
  
  <p>Then when the user changes a text field this code is run this;</p>
  
  <pre><code>-(void)textFieldDidEndEditing:(UITextField *)textField{
      NSObject *rowData = [self.myDetails objectAtIndex:selectedRow];
  
      NSString *yards = textField.text;
  
      [rowData setValue:yards forKey:@"yards"];
  
      [self.myDetails replaceObjectAtIndex:selectedRow withObject:rowData];
  }
  </code></pre>
  
  <p>When stepping through the code on the line [rowData setValue:yards forKey:@"yards"]; it returns this error;</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object'
  </code></pre>