Sha256: 49abfdd9845a79124b1651ebf73546326c305d874fcbb034210e5a9cedbb0fe5

Contents?: true

Size: 480 Bytes

Versions: 9

Compression:

Stored size: 480 Bytes

Contents

module UI
  class Web < View
    def load_html(string)
      proxy.loadHTMLString(string, baseURL: NSBundle.mainBundle.bundleURL)
    end

    def webView(web_view, shouldStartLoadWithRequest:request, navigationType:navigation_type)
      true
    end

    def proxy
      @proxy ||= begin
        ui_web_view = UIWebView.new
        ui_web_view.translatesAutoresizingMaskIntoConstraints = false
        ui_web_view.delegate = self
        ui_web_view
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
motion-flow-0.1.8 flow/ui/cocoa/web.rb
motion-flow-0.1.7 flow/ui/cocoa/web.rb
motion-flow-0.1.6 flow/ui/cocoa/web.rb
motion-flow-0.1.5 flow/ui/cocoa/web.rb
motion-flow-0.1.4 flow/ui/cocoa/web.rb
motion-flow-0.1.3 flow/ui/cocoa/web.rb
motion-flow-0.1.2 flow/ui/cocoa/web.rb
motion-flow-0.1.1 flow/ui/cocoa/web.rb
motion-flow-0.1 flow/ui/cocoa/web.rb