[英]iOS in-App browser
嘿,我正在構建一個 iOS RSS 閱讀器新聞應用程序。 一些長 RSS 文章以“閱讀更多”鏈接結尾。 單擊“閱讀更多”后,Safari 將打開。 我希望它 - 而不是讓 Safari 打開該鏈接 - 在應用程序內打開它。
注意:我需要它與應用程序中的每個鏈接永久運行,而無需手動更改將在應用程序內打開的鏈接。
創建一個 WebViewController,只是一個普通的 ViewController,帶有一個屏幕大小的 webView。 那么你只要
let webViewController = WebViewController()
webViewController.title = yourRSSItem.title
webViewController.request = NSURLRequest(URL: NSURL(string: yourRSSItem.url)!)
self.navigationController?.pushViewController(webViewController, animated: true) //you can present it as well
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.