2017-02-22 138 views

回答

17

使用像

if let url = URL(string: "\(myUrl)") { 
       UIApplication.shared.open(url, options: [:], completionHandler: nil) 
      } 

更多參考見本樣本link

+0

TY花花公子工作,我會同意你的答案。 – SwiftDeveloper

+0

@Swift開發者 - 確定並高興地聽到 –

3

嘗試使用此:

UIApplication.shared.open(URL(string: "\(myUrl)")!) 
相關問題