๋ฐ์ํ
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("์๋ฃ๋์์")
}
}
๋ฐ์ํ
'๐ iOS > UIkit' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
AVFoundation (0) | 2023.06.29 |
---|---|
SwiftLint ์ค์นํ๊ณ ์ ์ฉํ๊ธฐ (0) | 2023.04.24 |
UIView์ Drawing Cycle (0) | 2023.03.24 |
App Lifecycle (0) | 2023.03.23 |
ViewController LifeCycle (0) | 2023.03.23 |