我想创建类似IOS地图的东西:
所以我用第一个透明的元素创建一个ScrollView。 我的问题是我想在触摸ScrollView的第一个元素时移动地图。所以我想在第一个元素上禁用touch事件。那有可能吗?
我的伪代码:
<ScrollView
style={[styles.content, { width }]}
stickyHeaderIndices={[1]}
showsVerticalScrollIndicator={false}
>
<View style={styles.firstCell} pointerEvents="box-none"/>
<View style={{ backgroundColor: 'white' }}>
<Text>header</Text>
</View>
<Text>content</Text>
</ScrollView>
let styles = StyleSheet.create({
content: {
position: 'absolute',
top: 50,
bottom: 0,
},
firstCell: {
backgroundColor: 'transparent',
height: 500,
},
});