Sencha Touch/HTML5 从左到右滑动事件/效果
我尝试在 Sencha Touch 或 HTML5 中从左到右执行滑动事件/效果。 因此,如果 HTML 页面在 iOS 上运行,那么当用户在屏幕上用手指从左向右触摸并移动/滑动时,它应该启动动画。
有什么想法可以“轻松”地做到这一点吗?
I try to do a swipe event/effect from left to right in Sencha Touch or HTML5.
So if the HTML page runs on iOS then it should start an animation if the user touche ans moves/swipe with the finger from the left to the right on the screen.
Any ideas how this can be done 'easily'?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果我理解正确的话,如果用户向左/向右滑动屏幕,您想要切换内容。我相信最简单的方法是使用轮播。请看一下 Sencha Touch 厨房水槽示例(用户界面 -> 旋转木马):
http://dev.sencha.com/deploy/touch/examples/kitchensink/
下面是取自 Kitcen Sink 的代码示例,演示了 Carousel 的使用:
If I understood you correctly, you want to switch content if the user swipes the screen to either left/right. I believe the easiest approach is to use a Carousel. Please have a look at the Sencha Touch Kitchen Sink example (User Interface -> Carousel):
http://dev.sencha.com/deploy/touch/examples/kitchensink/
Below is a code example taken from the Kitcen Sink that demonstrates the use of a Carousel:
您可以添加类似这样的手势滑动事件。
希望这对您有帮助。
You can add gesture swipe event something like this.
Hope this help you.
嗯...那么,在轮播中,如果想要捕获该滑动事件,当用户实际从左到右或反之亦然地滑动屏幕时...并捕获该数据,即滑动的方向?
Hmm... So, in a carousel, what if one wants to capture that swipe event, when a user actually swipes the screen, from left to right or viceversa... and capture that data as well, which direction it was swiped?