dimanche 16 septembre 2018

webview show in offline swift

I am using web view in my application showing to wekepedia page in online. I have to show the web view with wekipage in offline. I tried cache but it's not working for offline

 let converstring = namestring.replacingOccurrences(of: " ", with: "_")
        let url = URL(string: "https://en.wikipedia.org/wiki/" + converstring)
        var requesobj = URLRequest(url: url!)
        requesobj.cachePolicy = .returnCacheDataElseLoad
        webview.loadRequest(requesobj)

I want show the web view with wiki page in offline




Aucun commentaire:

Enregistrer un commentaire