title: Cannot access NSManagedObject's property after viewDidLoad
body: <p>I can not get access to my NSManagedObject's property. I see this object and can access to property in <code>viewDidLoad</code> but then in <code>viewWillAppear</code> and further methods I still see this object but getting <code>null</code> after calling property.</p>
  
  <p>@interface ListsViewController () </p>
  
  <pre><code>@property (weak, nonatomic) IBOutlet UITableView *tableView;
  @property (strong, nonatomic) NSArray *lists;
  
  @end
  
  @implementation ListsViewController
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
      NSManagedObjectContext *managedObjectContext = [[CoreDataController sharedInstance] newManagedObjectContext];
      NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"List"];
      NSError *error = nil;
      NSArray *result = [managedObjectContext executeFetchRequest:request error:&amp;error];
      if (!result) {
          NSLog(@"Failure fetch: %@", error);
      } else {
          self.lists = result;
          NSLog(@"%@", self.lists);
          List *list = [self.lists firstObject];
          NSLog(@"%@", list.name);
      }
  
      self.tableView.delegate = self;
  //    self.tableView.dataSource = self;
  }
  
  - (void)viewWillAppear:(BOOL)animated {
      [super viewWillAppear:animated];
  
      NSLog(@"%@", self.lists);
      List *list = [self.lists firstObject];
      NSLog(@"%@", list.name);
  }
  </code></pre>
  
  <p>Console:</p>
  
  <pre><code>(
   "&lt;List: 0x7fb5b9e6b7c0&gt; (entity: List; id: 0xd000000000040000 &lt;x-coredata://D831EA3F-2A96-4AA8-B9CF-BFFEB0B6D611/List/p1&gt; ; data: &lt;fault&gt;)",
   "&lt;List: 0x7fb5b9e53700&gt; (entity: List; id: 0xd000000000080000 &lt;x-coredata://D831EA3F-2A96-4AA8-B9CF-BFFEB0B6D611/List/p2&gt; ; data: &lt;fault&gt;)"
   )
  Underway
  (
   "&lt;List: 0x7fb5b9e6b7c0&gt; (entity: List; id: 0xd000000000040000 &lt;x-coredata://D831EA3F-2A96-4AA8-B9CF-BFFEB0B6D611/List/p1&gt; ; data: &lt;fault&gt;)",
   "&lt;List: 0x7fb5b9e53700&gt; (entity: List; id: 0xd000000000080000 &lt;x-coredata://D831EA3F-2A96-4AA8-B9CF-BFFEB0B6D611/List/p2&gt; ; data: &lt;fault&gt;)"
   )
  (null)
  </code></pre>
  
  <p>What am I do wrong?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My mistake was I did not hold managedObjectContext:</p>
  
  <pre><code>@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
  
  - (void)viewDidLoad {
      self.managedObjectContext = [[CoreDataController sharedInstance] newManagedObjectContext];
  }
  </code></pre>
  
  <p>Now it works fine.</p>