callstack / react-native-pager-view

React Native wrapper for the Android ViewPager and iOS UIPageViewController.
MIT License
2.68k stars 412 forks source link

Negative pageMargin not working on iOS - Seeking alternative solution for desired effect #840

Closed luckykellan closed 3 months ago

luckykellan commented 3 months ago

Hi,

I'm experiencing an issue with the pageMargin property in the React Native Pager View on iOS. It seems that setting a negative value for pageMargin doesn't work, which is preventing me from achieving the desired layout as shown in the attached image.

Expected Behavior: The pageMargin should accept negative values on iOS to allow for the overlap effect between pages.

Actual Behavior: On iOS, setting a negative value for pageMargin has no effect.

Screenshots:

image

I'm looking for a solution or a workaround to achieve the same overlapping page effect on iOS. Any suggestions or alternative methods to implement this layout would be greatly appreciated.

Thank you for your help!

MrRefactor commented 3 months ago

With the stable implementation based on native components, we are not supporting negative margin values, if you want that behaviour you need to use experimental useNext which is based on react-native ScrollView component

Slepzs commented 1 month ago

@luckykellan Did this fix your issue, or did you end up doing something else?