ฉันมี ScrollView นี้:
<ScrollView orientation="horizontal" id='scroll'>
<StackLayout orientation='horizontal' swipe='swipe'>
<Image src="image1" />
<Image src="image2" />
<Image src="image3" />
<Image src="image4" />
</StackLayout>
</ScrollView>
และจส:
function swipe(args) {
var scroll = args.view;
scroll.scrollToHorizontalOffset(0, true);
}
exports.swipe = swipe;
ฉันคาดหวังว่าทุกครั้งที่ฉันปัดบน scrollView มันจะไปที่horizontalOffset ที่ฉันตั้งไว้ที่ scrollToHorizontalOffset แต่มันไม่ทำงาน