๐ iOS/UIkit
[UIkit] Alert
JerryiOS
2023. 3. 27. 21:17
func popUp() {
let alert = UIAlertController(title: "์๋ฆผ์ฐฝ์ด๋ฆ", message: "์๋ฆผ์ฐฝ ๋ฉ์์ง", preferredStyle: .alert)
let success = UIAlertAction(title: "ํ์ธ", style: .default) { action in
print("ํ์ธ๋ฒํผ์ด ๋๋ ธ์ต๋๋ค.")
}
let cancel = UIAlertAction(title: "์ทจ์", style: .cancel) { cancel in
print("์ทจ์๋ฒํผ์ด ๋๋ ธ์ต๋๋ค.")
}
alert.addAction(success)
alert.addAction(cancel)
present(alert, animated: true) {
print("์๋ฃ๋์์")
}
}
๋ฐ์ํ