title: Modify a button when the app is loaded (iOS)
body: <p>I've created, in Xcode, a single view application with a button containing the text "bad text".</p>
  
  <p>I would like that the text of this button becomes "good text" when the app is loaded.</p>
  
  <p>For this purpose : </p>
  
  <ul>
  <li>I've created an outlet from this button to my controller</li>
  <li>I've added a "load" method to my controller, which calls setTitle of the button</li>
  <li>I've called "load" of the controller in <code>(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</code></li>
  </ul>
  
  <p>When I launch the app, <code>load</code> is called, but the text of the button doesn't change. If I change the text of the button latter, for example when the user click on the button, it works.</p>
  
  <p>My hypothesis is that when <code>load</code>is called, the outlet is not already created. Is it true ? How can I resolve this please ?</p>
  
  <p>[edit] Here is the code in the AppDelegate :</p>
  
  <pre><code>FreqViewController* mainController = (FreqViewController*) self.window.rootViewController;
  [mainController load];
  return YES;
  </code></pre>
  
  <p>I didn't know that we shouldn't put code in the AppDelegate. So how can I do something when the controller is loaded ?</p>