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

Introduction to WebKitPlus

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for yashigani yashigani
April 15, 2015

Introduction to WebKitPlus

Introduction to WebKitPlus at potatotips #16.
Check it!!! -> https://github.com/yashigani/WebKitPlus

Avatar for yashigani

yashigani

April 15, 2015
Tweet

More Decks by yashigani

Other Decks in Programming

Transcript

  1. lazy var UIDelegate = WKUIDelegatePlus(self) override public func viewDidLoad() {

    super.viewDidLoad() webView.UIDelegate = UIDelegate }
  2. lazy var observer = WebViewObserver(self.webView) override public func viewDidLoad() {

    super.viewDidLoad() observer.onTitleChanged = { [weak self] in self?.title = $0 } observer.onProgressChanged = { [weak self] in self?.progressbar.progress = $0 } }
  3. • WKWebViewΛ࣋ͬͨView Controller • Zen = “ષ” • WKWebViewૢ࡞ͷͨΊͷIBAction •

    goBack/goForward/reload/stopLoading • WKUIDelegatePlus, WebViewObserverΛ࣮૷ • storyboard͔Β࢖͑Δͧʂʂʂ