IOS(Swift)

IOS Alert Example

----___<<<<< 2021. 1. 1. 02:43

간단한 IOS Alert 예제입니다.

 

 

let alert = UIAlertController(title: "Your Title", message: "Your Message", preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (action: UIAlertAction!) in
print("Handle Ok logic here")
}))
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { (action: UIAlertAction!) in
print("Handle Cancel logic here")
}))
present(alert, animated: true, completion: nil)

'IOS(Swift)' 카테고리의 다른 글

IOS ImageView Click  (0) 2021.01.01
IOS Admob달기  (0) 2021.01.01
IOS Firestore  (0) 2020.12.30
IOS Firebase anonymous Auth  (0) 2020.12.30
pb.h' file not found with angled include use quotes instead  (0) 2020.12.30