title: How to create uialertcontroller in global swift
body: <p>I'm trying to create <code>uialertcontroller</code> in <code>Config.swift</code> file as follow.</p>
  
  <pre><code>static func showAlertMessage(titleStr:String, messageStr:String) -&gt; Void {
      let window : UIWindow?
      let alert = UIAlertController(title: titleStr, message: messageStr, preferredStyle: UIAlertControllerStyle.Alert);
      self.window!.presentViewController(alert, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>problem is I've found problem in <code>self.window!.</code></p>
  
  <blockquote>
    <p>Type 'Config' has no member 'window'</p>
  </blockquote>
  
  <p>Please let me know how to solve that issue.</p>