title: Best way to set up a NSViewController initialized with initWithNibName:bundle:?
body: <p>i have a subclass of NSViewController that loads its view from a nib (with initWithNibName:bundle: and it is the file's owner of that nib).</p>
  
  <p>I need to do some initialization after the nib is loaded and i want my code to be the most compatible :</p>
  
  <ul>
  <li>In ios : There is the viewDidLoad method to do that</li>
  <li>In osx : In snow leopard, there is no method like viewDidLoad but awakeFromNib is called on the file's owner of the nib too</li>
  </ul>
  
  <p>So my questions are :</p>
  
  <ol>
  <li>Is awakeFromNib called also on the file's owner of the nib in Lion ?</li>
  <li>If i use awakeFromNib, do i need to call [super awakeFromNib] ? (is NSViewController implements awakeFromNib ?)</li>
  <li>If answer 1 is YES, is this a good solution ? :</li>
  </ol>
  
  <blockquote>
  <pre><code>- (void)initAfterNibLoaded {
     ...
  }
  
  - (void)viewDidLoad {
     // Code for ios
     [self initAfterNibLoaded];
  }
  
  - (void)awakeFromNib {
     // Code for osx
  
     // Not sure if necessary
     [super awakeFromNib];
  
     [self initAfterNibLoaded];
  }
  </code></pre>
  </blockquote>
  
  <p>If answer 1 is NO, is this a good solution ? :</p>
  
  <pre><code>- (void)viewDidLoad {
     // Initialize after nib loaded
  }
  
  #ifndef TARGET_OS_IPHONE
  - (void)loadView {
     // Call parent method
     [super loadView];
  
     // Simulate viewDidLoad method
     [self viewDidLoad];
  }
  #endif
  </code></pre>
  
  <p>Thank you</p>