title: Updating the values in core data
body: <p>I have a list of expenses and their price stored in core data in view1.
  I am retrieving these values in view2 and showing them in a tableView.</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  //Displayin the values in a Cell.
  
  NSManagedObject *records = nil;
          records = [self.listOfExpenses objectAtIndex:indexPath.row];
          self.firstLabel.text = [records valueForKey:@"category"];
          NSString *dateString = [NSString stringWithFormat:@"%@",[records valueForKey:@"date"]];
          NSString *dateWithInitialFormat = dateString;
          NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
          [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"];
          NSDate *date = [dateFormatter dateFromString:dateWithInitialFormat];
          [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
          NSString *dateWithNewFormat = [dateFormatter stringFromDate:date];
          self.secondLabel.text = dateWithNewFormat;
          [dateFormatter release];
          NSString *amountString = [NSString stringWithFormat:@"%@",[records valueForKey:@"amount"]];
          self.thirdLabel.text = amountString;
  }
  </code></pre>
  
  <p>if i click on a row in the tableView it should navigate to view1 and i should be able to edit the values and update in the core data.Can any one tell me how to achieve this?</p>