swift 2
override func prefersStatusBarHidden() -> Bool {
return true
}
swift 3
override var prefersStatusBarHidden: Bool {
return true
}
:
let alertController = UIAlertController(title: "Error", message: "No internet connection", preferredStyle: .alert)
let OKAction = UIAlertAction(title: "OK", style: .default) { (action:UIAlertAction) in
print("OK button pressed");
}
alertController.addAction(OKAction)
self.present(alertController, animated: true, completion:nil)
}
, , :
https://github.com/k-sathireddy/AlertControllerSample