title: Call a function in AppDelegate?
body: <p>Following the solution (the highest-voted answer actually) at <a href="https://stackoverflow.com/questions/693483/textfield-example-in-cocos2d">UITextField Example in Cocos2d</a>, I managed to do it except the line</p>
  
  <pre><code>[[[UIApplication sharedApplication] delegate] specifyStartLevel];
  </code></pre>
  
  <p>I have placed it in my scene, I get this warning:</p>
  
  <blockquote>
    <p><strong>Instance method '-specifyStartLevel' not found (return type defaults to 'id')</strong></p>
  </blockquote>
  
  <p>Why is that? I clearly have <code>-specifyStartLevel</code> defined in the header and implementation of my AppDelegate...</p>
  
  <hr>
  
  <p><strong>Edit</strong>: Declaration of <em>specifyStartLevel</em></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @class RootViewController;
  
  @interface AppDelegate : NSObject &lt;UIApplicationDelegate,UITextFieldDelegate&gt; {
      UIWindow            *window;
      UITextField *levelEntryTextField;
      RootViewController  *viewController;
  }
  - (void)specifyStartLevel;
  @property (nonatomic, retain) UIWindow *window;
  
  @end
  </code></pre>
  
  <p>And implementation:</p>
  
  <pre><code>- (void)specifyStartLevel
  {
      [levelEntryTextField setText:@""];
      [window addSubview:levelEntryTextField];
      [levelEntryTextField becomeFirstResponder];    
  }
  </code></pre>