CC.
CC.

Reputation: 2928

ios 8 swift double paging like facebook paper app

I'm working on a iOS app and I would like to build something like I saw on the Facebook Paper. Here attached some design of what I want to achieve. Basically, in the upper half of the screen I have a paging. In the lower half, I would like to have another paging that corresponds to the page in the upper side. So, when I scroll the upper side page I want to change the pages on the lower side. So for each upper page I have several lower pages (not the same number of sub pages for each page).

Any idea how to achieve that ? I'm thinking of using a UICollectionView but is this the best solution? If so, how to build the lower paging system?

Thanks for any idea.

C.C.

enter image description here

Upvotes: 0

Views: 465

Answers (1)

Duncan C
Duncan C

Reputation: 131491

You should look at using a UIPageViewController. It's pretty much a glove fit for what you want. You can make it so that the pages either scroll from one to the next, or use a page curl effect like iBooks (both effects are built right into the page view controller.

You could host a second page view controller on each page to do the sub-page scrolling you want. (You'd put a container view on each page where you want the sub-page to go, and then link the container view to a second page view controller with an embed segue.)

Upvotes: 1

Related Questions