我按照这里的答案
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上进行了测试。
问题:
向右滑动。例如:从Surface 5
移至Surface 4
触摸屏幕
它突然回到Surface 5
我不确定为什么(平台中的bug是否存在)。 有没有办法解决这个问题?