swift ios : sử dụng UIAlert - thông báo trong swift
Hướng dẫn sử dụng UIAlert trong swift 1. Tạo project: Hướng đẫn : http://swiftiosswift.blogspot.com/2016/03/swift-tao-project-au-tien-bang-xcode.html 2. vào file ViewController Chúng ta bắt đầu viết code 2.1 Thông báo với 1 button @IBAction func alert(sender: UIButton ) { let alertController = UIAlertController (title: "Thông báo" , message: "Bạn có tin nh ắ n mới" , preferredStyle: UIAlertControllerStyle . Alert ) let ok = UIAlertAction (title: "ok" , style: . Default , handler: { (action) -> Void in print ( "ok" ) }) alertController. addAction (ok) self . presentViewController (alertController, animated: true , completion: ...