Paginated Scrollview会再次触摸滚动

时间:2014-05-15 17:25:58

标签: javascript ios famo.us

我按照这里的答案

How to Swipe between surfaces in Famo.us?

var Engine           = require("famous/core/Engine");
var Surface          = require("famous/core/Surface");
var Scrollview       = require("famous/views/Scrollview");

var mainContext = Engine.createContext();

var scrollview = new Scrollview({
    direction: 0,
    paginated: true
});
var surfaces = [];

scrollview.sequenceFrom(surfaces);

for (var i = 0; i < 10; i++) {
    surface = new Surface({
        content: "Surface: " + (i + 1),
        size: [window.innerWidth, window.innerHeight],
        properties: {
            backgroundColor: "hsl(" + (i * 360 / 10) + ", 100%, 50%)",
            lineHeight: window.innerHeight/10 + "px",
            textAlign: "center"
        }
    });

    surface.pipe(scrollview);

    surfaces.push(surface);
}

mainContext.add(scrollview);

我在iPhone 5的真实iOS 7上进行了测试。

问题:

  1. 向右滑动。例如:从Surface 5移至Surface 4

  2. 触摸屏幕

  3. 它突然回到Surface 5

  4. 我不确定为什么(平台中的bug是否存在)。 有没有办法解决这个问题?

0 个答案:

没有答案