我正在尝试uialertcontroller在Config.swift文件中创建如下.
static func showAlertMessage(titleStr:String, messageStr:String) -> Void {
    let window : UIWindow?
    let alert = UIAlertController(title: titleStr, message: messageStr, preferredStyle: UIAlertControllerStyle.Alert);
    self.window!.presentViewController(alert, animated: true, completion: nil)
}
问题是我发现了问题 self.window!.
类型'Config'没有会员'窗口'
请让我知道如何解决这个问题.