【发布时间】:2016-04-14 20:18:05
【问题描述】:
我正在构建一个照片浏览器应用程序,用户应该在其中滑动页面以查看不同的照片。这是目前适合我的视图。
<ScrollView orientation="horizontal" ios.pagingEnabled="true" >
<StackLayout orientation="horizontal">
<Image *ngFor="#picture of buffer" [src]="picture.originUrl" stretch="aspectFit"></Image>
</StackLayout>
</ScrollView>
当我尝试应用 叠加层 时出现问题。因此,我尝试将整个内容包裹在 AbsoluteLayout 中,这样我就可以让 ScrollView 正常运行,但将 overlay 保持在顶部。当我这样做时,滚动会完全中断。这是中断滚动的视图:
<AbsoluteLayout>
<Label text="overlay" left="0" tope="0"></Label>
<ScrollView orientation="horizontal" ios.pagingEnabled="true" left="0" top="0">
<StackLayout orientation="horizontal">
<Image *ngFor="#picture of buffer" [src]="picture.originUrl" stretch="aspectFit"></Image>
</StackLayout>
</ScrollView>
</AbsoluteLayout>
布局似乎工作正常,但滚动中断。 有人对如何实现这一点有任何想法吗?
【问题讨论】:
标签: ios angular nativescript