自分用のメモです。
ネットで多く用いられている方法を使うとif文の中にアラートを入れられないのですが、以下のコードで試したところうまく行きました。
ViewVontroller.swift
//if分の中に挿入しても問題なく出せる。
let alert = UIAlertView()
alert.title = "Title"
alert.message = "My message"
alert.addButton(withTitle: "Ok")
alert.show()
We'll deliver articles that match you.
You can read useful information later.
Go to list of users who liked
More than 5 years have passed since last update.
自分用のメモです。
ネットで多く用いられている方法を使うとif文の中にアラートを入れられないのですが、以下のコードで試したところうまく行きました。
//if分の中に挿入しても問題なく出せる。
let alert = UIAlertView()
alert.title = "Title"
alert.message = "My message"
alert.addButton(withTitle: "Ok")
alert.show()
Register as a new user and use Qiita more conveniently
Qiita Conference is the largest tech conference in Qiita!
Keynote Speaker
ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar
View event detailsGo to list of users who liked