'@IBOutlet 없이 @IBAction 연결 시 action을 수행하나?'라는 부분이 궁금했다.
작동한다!
@IBOutlet var pressedButton: UIButton!
@IBAction func pressButton(_ sender: Any) {
let alert = UIAlertController(
title: "타이틀",
message: "안녕하세요",
preferredStyle: .alert
)
let ok = UIAlertAction(
title: "OKtitle",
style: .default) { action in
}
alert.addAction(ok)
present(alert,animated: true, completion: nil)
}