Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WkWebViewのお話

taminif
August 26, 2017

 WkWebViewのお話

Cocoa勉強会関西 #74で発表した資料です。

taminif

August 26, 2017
Tweet

More Decks by taminif

Other Decks in Programming

Transcript

  1. WKWebViewʹΑΔHTTP௨৴ ϒϥ΢β αʔόʔ ϦΫΤετ Ϩεϙϯε EFDJEF1PMJDZ'PS OBWJHBUJPO"DUJPO EJE4UBSU1SPWJTJPOBM/BWJHBUJPO ϦμΠϨΫτ࣌͸͜͜Ͱ໭Δ EJE3FDFJWF4FSWFS3FEJSFDU'PS1SPWJTJPOBM/BWJHBUJPO

    ϦμΠϨΫτ࣌ͷΈ EJE'BJM1SPWJTJPOBM/BWJHBUJPO Τϥʔൃੜ࣌ͷΈ EFDJEF1PMJDZ'PS OBWJHBUJPO3FTQPOTF EJE$PNNJU EJE'JOJTI EJE3FDFJWF શͯ8,/BWJHBUJPO%FMFHBUFͷؔ਺
  2. WKWebViewʹΑΔHTTP௨৴ ϒϥ΢β αʔόʔ ϦΫΤετ Ϩεϙϯε EFDJEF1PMJDZ'PS OBWJHBUJPO"DUJPO EFDJEF1PMJDZ'PS OBWJHBUJPO3FTQPOTF EFDJEF1PMJDZ'PSͰ

    ಡΈࠐΈΛڐՄ͢Δ͔Ωϟϯηϧ͢Δ͔Λ ઃఆͰ͖Δ ϦΫΤετͩͱVSM΍ϑΥʔϜૹ৴ ϨεϙϯεͩͱϨεϙϯείʔυ΍.*.&λΠϓ Ͱ൑ఆͰ͖Δ
  3. ϩʔΧϧϑΝΠϧΛಡΈࠐΉ let termsOfUsePath = Bundle.main.path(forResource: "privacyPolicy.html", ofType: nil)! let termsOfUseHtmlData

    = try! Data(contentsOf: URL(fileURLWithPath: termsOfUsePath)) termsOfUseHtml = String(data: termsOfUseHtmlData, encoding: String.Encoding.utf8) webView.loadHTMLString(termsOfUseHtml, baseURL: URL(string: TermsOfUseViewController.TERMS_OF_USE_URL)!) #VOEMFͰಡΈग़ͨ͠จࣈྻ Λ8,8FC7JFXʹϩʔυ