user2202911
user2202911

Reputation: 3014

Combining Navigation with Controller to PageViewController

I am using a PageViewController to manage a series of viewControllers which all use a tableview. As the following picture depicts the PageViewController is a container controller for the PageContentViewControllers

pvc

After clicking on a tableCell I would like the app to navigate to a detailed view. From what I have read, the proper way to do this is by using a navigationController which is also a container controller.

Through storyboard I have tried putting the NavigationController at both the PageViewController and the PageContentViewController and neither seems to work correctly, I am not sure what other approach I am take.

What is the proper way to combine a PageViewController with a NavigationController if they are both container controllers?

Upvotes: 1

Views: 202

Answers (1)

Juul
Juul

Reputation: 642

Depending on how you want to structure your app:

  1. Embed your PageViewController in a Navigation Controller (select the PageViewController in storyboard and choose Editor > Embed In > Navigation Controller)
  2. Embed the new Navigation Controller in a Container View within a super controller.

Upvotes: 1

Related Questions