stefanceriu / SCPageViewController

Just like UIPageViewController but better.. :)
MIT License
352 stars 70 forks source link

Half pages? #14

Closed fatuhoku closed 9 years ago

fatuhoku commented 9 years ago

I have a use-case where I have a sequence of transparent pages that I want to present as horizontal row of pages, except, with the next page overlapping the current page by half a page's width.

I was able to approximate this in the Demo application with the following:

    SCPageLayouter *layouter = [[SCPageLayouter alloc] init];
    layouter.interItemSpacing = [UIScreen defaultScreen].bounds.size.width / 2;

However, I found the snapping behaviour between Page 0 and Page 1 to get confused: the transition stops anywhere, as opposed to snapping to 0% or 50%.

stefanceriu commented 9 years ago

I'm not quite sure how this would look but I suggest you have a look at how 'navigation steps' work in the SCStackViewController. If that's indeed what you need I might be able to port them to the page view controller.

fatuhoku commented 9 years ago

Never mind — I went for a different solution in the end. I think too many percent-driven transitions happening all in one go probably is the wrong abstraction anyway.

stefanceriu commented 9 years ago

:ok_hand: