Tom*_*PPC 2 html5 swipe sencha-touch
我尝试在Sencha Touch或HTML5中从左到右进行滑动事件/效果.因此,如果HTML页面在iOS上运行,那么如果用户用手指在屏幕上从左到右移动/滑动它,它应该开始动画.
有什么想法可以"轻松"完成吗?
如果我理解正确,如果用户向左/向右滑动屏幕,则需要切换内容.我认为最简单的方法是使用Carousel.请看一下Sencha Touch Kitchen Sink示例(用户界面 - >旋转木马):http: //dev.sencha.com/deploy/touch/examples/kitchensink/
以下是从Kitcen Sink中获取的代码示例,演示了Carousel的使用:
new Ext.Panel({
cls: 'cards',
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [{
xtype: 'carousel',
items: [{
html: '<p>Navigate the carousel on this page by swiping left/right.</p>',
cls: 'card card1'
},
{
html: '<p>Clicking on either side of the indicators below</p>',
cls: 'card card2'
},
{
html: 'Card #3',
cls: 'card card3'
}]
}]
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14082 次 |
| 最近记录: |