title: prepareForSegue: object
body: <p>My app have core data and two views CoursesTableViewController and DetailViewController.</p>
  
  <p>If the user tap on Detail Disclosure button segue to DetailViewController to show some details. </p>
  
  <p>The app uses didSelectRowAtIndexPath and didDeselectRowAtIndexPath for other things.</p>
  
  <p><strong>CoursesTableViewController.m</strong></p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
  
      if ([[segue identifier] isEqualToString:@"showDetail"]) {
          NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
          NSManagedObject *object = [[self fetchedResultsController] objectAtIndexPath:indexPath];
          [[segue destinationViewController] setDetailItem:object];
  
      }
  
  }
  </code></pre>
  
  <p><strong>DetailViewController.h</strong></p>
  
  <pre><code>@property (strong, nonatomic) id detailItem;
  
  @property (weak, nonatomic) IBOutlet UITextField *courseCodeLabel;
  @property (weak, nonatomic) IBOutlet UITextField *courseNameLabel;
  </code></pre>
  
  <p><strong>DetailViewController.m</strong></p>
  
  <pre><code>@interface DetailViewController ()
  - (void)configureView;
  @end
  
  @implementation DetailViewController
  
  @synthesize detailItem = _detailItem;
  @synthesize courseCodeLabel = _courseCodeLabel;
  @synthesize courseNameLabel = _courseNameLabel;
  
  
  #pragma mark - Managing the detail item
  
  
  
  - (void)setDetailItem:(id)newDetailItem
  {
      if (_detailItem != newDetailItem) {
          _detailItem = newDetailItem;
  
          // Update the view.
          [self configureView];
      }
  }
  
  - (void)configureView
  {
      // Update the user interface for the detail item.
  
      if (self.detailItem) {
          self.courseCodeLabel.text = [[self.detailItem valueForKey:@"courseCode"] description];
          self.courseNameLabel.text = [[self.detailItem valueForKey:@"courseName"] description];
  
      }
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
      [self configureView];
  }
  
  - (void)viewDidUnload
  {
      [super viewDidUnload];
      // Release any retained subviews of the main view.
      self.courseCodeLabel = nil;
      self.courseNameLabel = nil;
  
  }
  </code></pre>
  
  <p>The problem is when I tap on Detail Disclosure the segue works good but in the DetailViewController there are no value in the courseCodeLabel and courseNameLabel.</p>