override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// Initialize Alert View
let alertController = UIAlertController(title: "No Internet connection", message: "Please Connect to Internet", preferredStyle: .Alert)
let EXITAction = UIAlertAction(title: "EXIT", style: .Destructive) {(action) in
//...
exit(0)
}
alertController.addAction(EXITAction)
self.presentViewController(alertController, animated: true) {
// ...
}
}
我試圖使用onLoad如果使用單擊然後退出。 但沒有發生。請幫助UIAlertController不能正常工作
(我很新的編程)
非常感謝。 –