我正在尝试使用Swift弹出警告信息。 这是我在viewDidLoad中使用的代码,但当运行代码时没有任何反应。 有人能帮忙吗?
var alert = UIAlertController(title: "test title",
message: "test message",
preferredStyle: .Alert)
self.presentViewController(alert, animated: true, completion:nil)