支持安卓和ios效果相同的react-native轮播图,实现淘宝详情页banner的效果。
ios:
android:
npm i react-native-super-swiper --s
<ReactNativeSuperSwiper
onChange={this.onChange}
isAndroid={false}
loadMoreOptions={{
enableLoadMore: true,
distance: 3,
initText: "左滑",
releaseText: "释放",
onArrive: () => { console.log("到达") },
onRelease: () => { console.log("释放") },
renderLoadMoreView: () => { }
}}
onScroll={this.onScroll}
onBeginDrag={this.onBeginDrag.bind(this)}
onEndDrag={this.onEndDrag.bind(this)}>
{this.state.swiperContent}
</ReactNativeSuperSwiper>