Recently, I made a project which needs to use UIPageViewController.
First, I made one UIPageVC and two normal UIVCs.(VC1, VC2)
So two normal VCs are controlled by the UIPageVC.
And then, I complete the vertical view paging successfully (not page curl mode, just scroll mode)
If I swipe down, than I can see the view change VC2 from VC1, and vice versa
Well, What i want to do is this.
1 I set the VC1 size to small, so let a portion of the VC2 can be seen.
[2] If I swipe down(or up?) change the current view to the entire VC2
[3] and swipe returning, 1 state comes back
The following picture can help you to understand my explanation.
How can I make this?
IS there a any way by controlling Storyboard or code?
Plz let me know :)
You can do this fairly easily using a normal UIScrollView
instead of a UIPageViewController
.
FirstVC
view to the scroll viewthen
SecondVC
view to the scroll viewand enable paging on the scroll view.
You can do all of this in IB / Storyboard, but working with large scroll content can be cumbersome. Since you already have the two parts in separate view controllers (if I understood your description correctly), it's easier to set the constraints in code.
I've posted a full working example at: https://github.com/DonMag/YetAnotherScrollExample