LoginSignup
23
19

More than 5 years have passed since last update.

【備忘録】Swiftでアプリからサファリを起動する方法

Posted at

初投稿だから投稿の仕方や記事の書き方を間違えていたらすみません。
自分用備忘録です。
Objective-Cでアプリからサファリを起動する方法はいろいろと見つかるけど、Swiftでは見つからなかったのでメモ。たぶん私の検索能力が低いだけで、すでに書いてらっしゃる方はいると思いますが。。。

    let url = NSURL(string:"http://qiita.com")
    let app:UIApplication = UIApplication.sharedApplication()
    app.openURL(url)

これだけです。

23
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
19