[swift] safariを起動して指定URLを開く
safariを起動して指定URLを開くには以下のコードで開くことができる。
let url = NSURL(string: "指定URL")
if UIApplication.shared.canOpenURL(url! as URL){
UIApplication.shared.openURL(url! as URL)
}
safariを起動して指定URLを開くには以下のコードで開くことができる。
let url = NSURL(string: "指定URL")
if UIApplication.shared.canOpenURL(url! as URL){
UIApplication.shared.openURL(url! as URL)
}