如何使用iOS Objective C在容器内创buildUIPageviewcontroller?

我已经创build了UIPageviewcontroller容器内有两个子视图控制器的页面导航。 现在的问题是我已经为mainviewcontroller上的容器设置约束如下

在这里输入图像说明

问题:需要控制容器。 其显示顶部和隐藏顶部custombar和景观也不播种。 我已经在基本视图上创build容器。 基本观点有很好的约束。

对于上述问题,我们需要设置如下

// 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];