title: Clean way to force view to load subviews early
body: <p>Recently I wrote some code where I tried to refer to an outlet on a <code>UIViewController</code> I'd just instantiated with <code>[storyboard instantiateViewControllerWithIdentifier]</code> and modify the subview that the outlet pointed to before presenting the <code>ViewController</code>. It didn't work because the <code>ViewController</code>'s view hadn't loaded its subviews yet, including the one that my outlet referred to, so the property just gave me a null pointer.</p>
  
  <p>After (with some struggle) tracking down the cause of my issue in the debugger, I Googled around and learned, through answers like <a href="https://stackoverflow.com/questions/1935526/make-a-view-initialized-from-initwithnibname-load-all-its-subview">this one</a>, that I can cause the view to load its subviews without being displayed by calling the <code>myViewController.view</code> getter. After that, I can access my outlet without any problems.</p>
  
  <p>It's a clear hack, though, and Xcode - quite rightly - doesn't like it, and angrily protests with this warning:</p>
  
  <blockquote>
    <p>Property access result unused - getters should not be used for side effects</p>
  </blockquote>
  
  <p>Is there a non-hacky alternative way to do this that doesn't involved abusing the <code>.view</code> getter? Alternatively, are there canonical/idiomatic patterns for this scenario involving something like dynamically adding a handler to be called as soon as the subviews are loaded?</p>
  
  <p>Or is the standard solution just to replace <code>myViewController.view</code> with <code>[myViewController view]</code> to shut up Xcode's warning, and then live with the hack?</p>