Open yaofly2012 opened 9 months ago
ScrollView
<ScrollView horizontal pagingEnabled nestedScrollEnabled showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} ref={scrollRef} > {childrens.map((child, index) => <View style={styles.childrenContainer} key={index}>{child}</View>)} </ScrollView>
如果初始展示非首帧,如何初始化ScrollView滚动位置呢?
contentOffset
contentInset
contentContainerStyle
FlatList
Navigation
RN轮播(走马灯/Swiper/Carousel/Snap )组件
ScrollView
实现
初始位置
如果初始展示非首帧,如何初始化
ScrollView
滚动位置呢?contentOffset
Issues/Conern
contentInset
只有iOS才支持,为啥不直接用contentContainerStyle
呢?参考
改用
FlatList
参考
ScrollView