📜  快速打开网址 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:03.034000             🧑  作者: Mango

代码示例1
guard let url = URL(string: "http://www.google.com") else {
  return //be safe
}

if #available(iOS 10.0, *) {
    UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
    UIApplication.shared.openURL(url)
}