简体   繁体   English

显示不占整个屏幕的UIPageViewController

[英]Show UIPageViewController that doesn't take whole screen

I'd like to show a book on landscape iPhone that would use page curl from UIPageViewController, but I'd like book not to take the whole screen. 我想展示一本关于横向iPhone的书,它将使用来自UIPageViewController的页面卷曲,但我希望书不要占据整个屏幕。

To clarify, let's say background is a wooden desk image and there is book on it that can be browsed using UIPageViewController and page curl but only book pages participate in page curl, background is completely static. 为了澄清,让我们说背景是一个木制的桌面图像,并且有可以使用UIPageViewController和页面卷曲浏览的书,但只有书页参与页面卷曲,背景是完全静态的。

Is this possible? 这可能吗?

Yes it is possible. 对的,这是可能的。 I have a UIPageViewController using on half the screen for example. 例如,我在一半的屏幕上使用UIPageViewController。 The secret is to add it into a parent view controller that is a custom container view controller 秘诀是将其添加到父视图控制器中,该控制器是自定义容器视图控制器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM