title: UIAlertController Detached View Controller
body: <p>Sometimes when I create a UIAlertController and present it in an if-statement, I get the the warning <code>Presenting view controllers on detached view controllers is discouraged.</code> How do I circumvent that warning? Is there something different I can do in calling &amp; presenting the UIAlertController? Should I use something different then putting the UIAlertController in a if-statement?</p>
  
  <pre><code>if(!defaults.boolForKey("hasLaunchedOnce")) {
          updateSettingsLabel.hidden = false
          var alert = UIAlertController(title: "Instructions", message: "Sample Text", preferredStyle: .Alert)
  
          let okAction = UIAlertAction(title: "OK", style: .Default) {
              (action: UIAlertAction!) -&gt; Void in
          }
  
          alert.addAction(okAction)
  
          presentViewController(alert, animated: true,completion: nil)
      }
  </code></pre>