UIAlertController in Swift4 (Swift)

UIAlertController in Swift4 (Swift)

Video Solutions

6 лет назад

38 Просмотров

Google Form: https://goo.gl/forms/IX4S4oqVw2wb0x3N2

Problem Statement:

How would I create a UIAlertView in Swift? I followed some tutorial and its not working for me - Has anything changed?

********************** Solution **********************

let alert = UIAlertController(title: "Alert", message: "Message", preferredStyle: UIAlertControllerStyle.alert)

alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
print("ok")
}))

self.present(alert, animated: true, completion: nil)


********************** Solution **********************

Тэги:

#swift #ios #video_solutions #mobile_development
Ссылки и html тэги не поддерживаются


Комментарии: