Swiping left to right does not work on iOS
export default function MyViewPager({ pagerItems }) {
return (
<View style={{ flex: 1 }}>
<PagerView style={{ flex: 1 }} initialPage={0}>
{pagerItems.map((item, index) => (
<View style={{ justifyContent: 'center', alignItems: 'center' }} key={index + 1 + ""}>
<Image source={{ uri: item }} style={{ width: 400, height: 400 }} />
</View>
))}
</PagerView>
</View>
);
}
I've used the above component to render the PagerView and it rendered on both platforms but navigating to the next page by swiping left worked on Android but not on iOS.
I'm using the expo to create the project.
Ref npx create-expo-app <Project name>
I noticed the same issue on v6, there used to be a workaround that worked on v5 that no longer seems to work reliably on v6. It relied on using left hitSlop with a negative amount of pixels. More details here https://github.com/PedroBern/react-native-collapsible-tab-view/issues/248
I would assume this would fix it properly: https://github.com/callstack/react-native-pager-view/pull/665
Hey @Puneet1796, this should work properly on the latest version, can you re-test?