간단한 IOS Alert 예제입니다.

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |