title: iOS: Add NSManagedObject to NSFetchedResultsController's fetchedObjects Array WITHOUT saving to CoreData
body: <p><strong>Scenario</strong> I am working on an app that displays social media posts into a <code>tableView</code>. The posts are pulled down from the Server and saved to CoreData on the device. So that if the user can not connect to the internet, the posts will still persist to the device. Each row in the <code>tableView</code> will be a post loaded via an <code>NSFetchedResultsController</code>, <em>except</em> every 10 rows I want to display an Advertisement. <strong>I do not want to persist the Advertisements to CoreData</strong>.</p>
  
  <p><strong>My Thought Process</strong> I want to use the <code>NSFetchedResultsController</code>'s <code>fetchedObjects</code> array to populate the <code>tableView</code>. When my <code>NSFetchedResultsController</code> retrieves the saved Server data, I want to add an Ad object to the array before supplying the <code>tableView</code> with the data.</p>
  
  <p><strong>What I've tried</strong></p>
  
  <pre><code>// The code below is inside a For Loop that iterates over the NSFetchResultsControllers array
  
  if (i != 0 &amp;&amp; (i%10 == 0)) {
  
      Ad *ad = [NSEntityDescription insertNewObjectForEntityForName:@"Ad" inManagedObjectContext:[DataStore sharedInstance].mainObjectContext];
  
      ad.postID = 0;
  }
  
  [self.tableView reloadData];
  </code></pre>
  
  <p><strong>Issue</strong> The code above does not change the postID for the row. Because I believe the <code>NSFetchResultsController</code> does not add a new object.</p>
  
  <p><strong>QUESTION</strong> How does one Add an object to <code>NSFetchResultsController</code> without having to save it to CoreData?</p>