Git Hub
коротко

Swft: uiAlertView

1 декабря 2016, 9:07

Пример 1

let alert = UIAlertController(title: "Alert", message: "Message", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: true, completion: nil)

Пример 2

let alert = UIAlertController(title: "Alert", message: "Message", preferredStyle: UIAlertControllerStyle.alert)
        alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default){
            UIAlertAction in
                print("close")
        })
        
        self.present(alert, animated: true, completion: {
            print("show AlertMessage")
        })
Поделиться
Популярное