问题
I have created UIPageviewcontroller Inside the container with two sub view controllers for page navigation. Now the problem Is I have set the constraints for container on mainviewcontroller like below
Issue : Need to control the container. its showing top side and hiding top custombar and landscape also Its not sowing. I have create container on base view. the base view have good constraints.
回答1:
For above issue We need to set like below
// Add the page view controller to this root view controller.
[self addChildViewController:self.pageViewController];
self.pageViewController.view.frame = self.containerView.frame;
[self.containerView addSubview:self.pageViewController.view];
[self.pageViewController didMoveToParentViewController:self];
来源:https://stackoverflow.com/questions/34260515/how-to-create-uipageviewcontroller-within-container-using-ios-objective-c