title: 3D Touch Peek and Pop from UITableViewCell how to hand over data to other UIViewController?
body: <p>my app stores different attributes in Core Data objects. They are all shown in a UITableView, if you click a cell, a DetailView is shown. the usual stuff like in the Master-Detail-XCode-Template.</p>
  
  <p>Now I want to implement 3D Touch with peek and pop. Like in the Mail app, 3D touch a cell, get preview, press deeper, pop in the detail. </p>
  
  <p>I got this working so far, but I can t figure out how to pass the corresponding data in </p>
  
  <pre><code>- (nullable UIViewController *)previewingContext:(id &lt;UIViewControllerPreviewing&gt;)previewingContext viewControllerForLocation:(CGPoint)location
  </code></pre>
  
  <p>and </p>
  
  <pre><code>- (void)previewingContext:(id &lt;UIViewControllerPreviewing&gt;)previewingContext commitViewController:(UIViewController *)viewControllerToCommit
  </code></pre>
  
  <p>to the other DetailViewController.</p>
  
  <p>If you just click the cell (no 3D touch) I hand over the data in </p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
      NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
      NSManagedObject *object = [[self fetchedResultsController] objectAtIndexPath:indexPath];
      [[segue destinationViewController] setDetailItem:object];
  </code></pre>
  
  <p>I am using a </p>
  
  <pre><code>id detailItem
  </code></pre>
  
  <p>in every ViewController and I set the corresponding object to it.</p>
  
  <p>So I try to get something similar to work, so in my DetailViewController my "detailItem" needs the corresponding Core Data object from the selected (3D touched) cell.</p>
  
  <p>Thanks for help !</p>