草庐IT

UIPageViewcontroller

全部标签

ios - UINavigationController 上的 UIPageViewController 自更改方向后不会重新布局其 subview Controller

我正在制作以下ViewController(VC)结构。[UINavigationViewController]->[UIPageViewController]->[UIViewControllers]那么,这个VC应该支持纵向和横向。我遇到的一个问题是向任何一边改变方向。你可以看出问题所在。红色区域是UIPageViewController子VC的背景色。蓝色区域是UIPageViewController的背景色。我猜子VC没有被UIPageViewController重新布局。我想了很久。我终于找到了解决方法,将以下重写函数添加到customUIPageViewController

iOS - UIPageViewController 大小推断与自由形式

这个问题在这里已经有了答案:startpositionoftableviewiswronginsimulator,andisnotthesameinstoryboard(2个答案)关闭7年前。我在XCode5的“StoryboardBuilder”中遇到了这个,但我并没有真正理解这个想法。当我向屏幕添加新的UIPageViewController时,我可以在SimulatedMetrics下拉列表的属性中选择Size。有几个选项,但我不明白两者之间的区别:Inferred和Freeform。这两者有什么区别?我的理解是没有区别,因为两者都将Controller打开为程序告诉它的任何大小

ios - 如何关闭 UIPageViewController?

我添加了一个UIPageViewController在我的新游戏中获取说明,我想关闭UIPageViewController在用户按下最后一个UIViewController上的“GOTIT”按钮后连接到UIPageViewController到目前为止我已经试过了:[self.pageVCdismissViewControllerAnimated:YEScompletion:nil];而且它不会删除UIPageViewController,为什么呢?我怎样才能消除它?为了显示/呈现UIPageViewController我这样做:[selfaddChildViewController

ios - 未调用 UIPageViewController 委托(delegate)方法

在我的应用程序中,我有一个RootViewController(UIPageViewController)、一个FirstController(UIViewController)和一个SecondController(UIViewController)。两个UIViewController中的两个View在RootViewController上滚动。在我的RootViewController.h中:@interfaceRootController:UIPageViewController但是当我在不同的View之间滚动时,委托(delegate)方法如下:-(void)pageView

ios - UIPageViewController 方向只向前

目标是创建一个只能向前导航的UIPageViewController。我正在使用数据源为UIPageViewController提供内容。方向设置为UIPageViewControllerNavigationDirectionForward,过渡样式为UIPageViewControllerTransitionStyleScroll。执行-(UIViewController*)pageViewController:(UIPageViewController*)pageViewControllerviewControllerAfterViewController:(UIViewContr

ios - 用户到达最后一页后,如何向 UIPageViewController 添加新页面?

我有一个UIPageViewController它包含从通过网络获取的数据实例化的ViewController。当用户进行分页并进入最后几页时,我启动一个新的网络操作并将生成的新ViewController放在我的UIPageViewControllerDataSource可变ViewController数组的末尾。总的来说,这一切都很好。但如果网络速度较慢(或用户速度较快),则有可能在网络操作完成之前到达最终页面。自pageViewController:viewControllerAfterViewController:当用户到达最后一页时被调用,它已经返回nil(“表示没有下一个V

ios - 将 UIPageViewController 滑动与 iOS 7 UINavigationController 向后滑动手势相结合

我有一个导航Controller,它推送一个包含UIPageViewController(PAGES)的ViewController(PARENT)。现在我使用平移/滑动手势在页面ViewController的子项之间切换。但是,我无法再使用从屏幕左边框滑动手势来弹出PARENT-viewcontroller,因为它在PAGES中被解释为手势。是否可以在显示最左侧的ViewController时完成滑动弹出?两个想法:在pageViewController:viewControllerBeforeViewController中返回nil->不起作用。限制触摸区域,如describedh

ios - 访问iOS6 UIPageViewController创建的UIPageControl?

我正在使用UIPageViewController,导航设置为水平,过渡样式设置为滚动(在InterfaceBuilder中),没有书脊。这给了我一个可爱的UIPageControl集成。现在我希望能够切换它是否显示(因为它下面有艺术品)。我已经尝试将presentationCountForPageViewController和presentationIndexForPageViewController设置为在应该隐藏UIPageControl时返回0,但这些方法不是在我需要的时候被调用。暂停堆栈跟踪,我看到它们被[UIPageViewController_updatePageCont

ios - 释放 UIPageViewController 中未使用的页面

我为每个基于UIViewController的文件使用单独的.h、.m和.xib文件基于UIPageViewController的图画书页面。每个页面加载动画、音乐等,占用内存约4MB。在Instruments中,随着每个页面的加载,可用内存下降了大约4MB。当翻页时,此内存永远不会释放。它最终会给出内存警告。UIPageViewController似乎将它实例化的每个页面都保存在内存中并且不会卸载它。因此,当页面快速翻动时,应用程序会崩溃。我希望能够卸载除UIPageViewController所需的3个页面之外的所有页面-上一页、当前页面和下一页。我如何卸载不需要的页面,因为它们是

ios - UIPageViewController 手势正在调用 viewControllerAfter : but doesn't animate

我有一个关于UIPageViewController的非常有趣的问题。我的项目设置与基于页面的应用程序模板示例非常相似。时不时地(但在一定程度上可重现)某个平移手势会调用-(UIViewController*)pageViewController:(UIPageViewController*)pageViewControllerviewControllerAfterViewController:(UIViewController*)viewController。我返回下一页的ViewController,但从未运行过翻页动画,也从未调用过我的委托(delegate)方法。这是viewC