title: Present VC from a framework -- use keyWindow?
body: <p>I'm building an SDK that presents a VC. I of course don't know what the VC architecture of the consumer's app will look like, so I'm looking for the most bulletproof way to present it.</p>
  
  <p>I wrote this:</p>
  
  <pre><code>// Get key window
  UIWindow* keyWindow;
  for (UIWindow* window in [[UIApplication sharedApplication] windows]) {
      if ([window isEqual:[UIApplication sharedApplication].keyWindow]) {
          keyWindow = window;
          break;
      }
  }
  
  [keyWindow.rootViewController presentViewController:controller animated:YES completion:nil];
  </code></pre>
  
  <p>However, I'm not sure if this is the best way. The keyWindow is the first responder window, however, is this the best window to present a VC from when you're writing SDK-level code that doesn't know the app's architecture?</p>