title: parent-child unrecognized selector sent to instance
body: <p>I have a subview, called DataViewController, and a parent viewcontroller, called RootViewController.</p>
  
  <p>Everytime is try to call a function or set a property that is defined in my RootViewController, from my subview, I get these errors:</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception
    'NSInvalidArgumentException', reason: '-[UIPageViewController
    setDetailsDataObject:]: unrecognized selector sent to instance
    0x6aa2df0'</p>
  </blockquote>
  
  <p>Code:</p>
  
  <p>RootViewController.h:</p>
  
  <pre><code>@property (strong, nonatomic) id detailsDataObject;
  </code></pre>
  
  <p>DataViewController.m:</p>
  
  <pre><code>((RootViewController *)self.parentViewController).detailsDataObject = self.dataObject;
  </code></pre>
  
  <p>And...</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception
    'NSInvalidArgumentException', reason: '-[UIPageViewController
    showDetails]: unrecognized selector sent to instance 0x6880db0'</p>
  </blockquote>
  
  <p>Code:</p>
  
  <p>RootViewController.h:</p>
  
  <pre><code>- (void)showDetails;
  </code></pre>
  
  <p>RootViewController.m:</p>
  
  <pre><code>- (void)showDetails
  {
      NSLog(@"Hello");
  }
  </code></pre>
  
  <p>DataViewController.m:</p>
  
  <pre><code>[((RootViewController *)self.parentViewController) showDetails];
  </code></pre>
  
  <p>Does anyone know how to fix these exceptions?</p>