How would it be possible to swipe (left) html pages?
相关问题
- How can I create this custom Bottom Navigation on
- how do you prevent page scroll in textarea on mobi
- Ionic Spinner not showing up
- onSupportNavigateUp() function not working?
- How to change the backgroundColor for all UITableV
相关文章
- How do you detect key up / key down events from a
- is there a “rails” way to redirect if mobile brows
- Can I release an app without the device?
- Ascii check mark is always red in mobile
- how to tell if android user came from home screen
- Android Navigation Drawer Show Up Indicator for Lo
- Overlapping Text in CSS - How do I change it?
- How to Setup Jetpack Navigation with material.Bott
Handling gestures happening on a web view is tricky, since UIWebView is really greedy with touches and wants to handle them all.
As usual with web views, you could try and do everything with Javascript. You can read something about it in this S.O. post.
The way I prefer handling pinching (zoom) and swiping on a web view though is following:
subclass
UIWindow
:install an instance of that window type as the window for your app in
application:didFinishLaunchingWithOptions
:Alternatively, you can assign a class to your window object in Interface Builder.
handle swipes and pinches in
sendEvent
in yourMyWebNavigatorWindow
class:You will need a mechanism in
sendEvent
to detect when the touch happens inside of your web view. In my case, I "register" all the views that I want to handle touch for and then check if the touch is inside them:then I handle the various touch phases to detect what kind of gesture it is (code snippet not compilable, but it gives the idea):