title: XCode compiler warning: 'foo' may not respond to -bar
body: <p>I'm trying to get my head around Objective-C for the iPhone. My app is compiling and running just fine so far, but I'm getting a compiler warning that I cannot get rid of.</p>
  
  <p>Header for one class: (snipped)</p>
  
  <pre><code>@interface PersonDetailViewController : UIViewController {
      NSDictionary *person;
  }
  @property (retain) NSDictionary *person;
  @end
  </code></pre>
  
  <p>Implementation for this class: (also snipped)</p>
  
  <pre><code>#import "PersonDetailViewController.h"
  @implementation PersonDetailViewController
  @synthesize person;
  @end
  </code></pre>
  
  <p>I'm creating an instance of PersonDetailViewController in PersonListViewController and calling:</p>
  
  <pre><code>#import "PersonListViewController.h"
  #import "Person.h"
  #import "PersonDetailViewController.h"
  
  @implementation PersonListViewController
  - (IBAction)myMethod:(id)sender {
      NSDictionary *person = [[Person alloc] initFromTestArray:[sender tag]];
      [personDetailViewController setPerson:person];
      [[personDetailViewController person] describe];
  }
  @end
  </code></pre>
  
  <p>And I'm then informed that:</p>
  
  <pre><code>warning: 'UIViewController' may not respond to '-setPerson' (Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.)
  warning: 'UIViewController' may not respond to '-person'
  </code></pre>
  
  <p>it does actually respond just fine, but I cannot figure out how to organise my headers so that the compiler would know what will respond...</p>
  
  <p>I'm all out of Google... hope I've given enough info and somebody can help.</p>
  
  <p>Thanks a heap!</p>