rubymotion-community / sugarcube

Some sugar for your cocoa. RubyMotion helpers.
Other
422 stars 66 forks source link

swipe guesture not working with webViewScreen #208

Closed poc7667 closed 9 years ago

poc7667 commented 9 years ago

swipe guesture not working with webViewScreen

I'm not sure what's the problem,

But it just doesn't work.

I running on the iOS 8.2 simulator

Rakefile

require 'sugarcube-gestures'

Webview

class WebScreen < PM::WebScreen attr_accessor :url status_bar :none

def on_load
  test_if_login
  set_nav_bar_button :left, title: "Back", action: :go_back
  view.on_swipe :left do
    go_back
  end
end

def go_back
  if webview.canGoBack
    PM.logger.debug "go back"
    webview.goBack
  end
end

end

colinta commented 9 years ago

Have you tried to add a swipe gesture manually, to see if it's a compatibility issue with UIWebView and UISwipeGestureRecognizer?

poc7667 commented 9 years ago

I will try that, thanks :)