Tuesday, September 27, 2016

Introduction to UIAlertController, Swift 3.0.

    let learningAlertController = UIAlertController(title: "Hello!!!", message: "I'm alert controller", preferredStyle: .alert)

    let okAlertAction = UIAlertAction(title: "OK", style: .default) { (action:UIAlertAction) in
        print("You've pressed OK button");
    }
    learningAlertController.addAction(okAlertAction)
    present(learningAlertController, animated: true, completion: nil)

No comments:

Post a Comment