uipageviewcontroller

How do I position a subview in UIPageViewController using Auto Layout?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 12:42:54
问题 I have a UIPageViewController subclass, and in its viewDidLoad I want to add a UILabel to its self.view . This works fine if I set its position using frames, but if I try to position it using Auto Layout, I get: * Assertion failure in -[_UIPageViewControllerContentView layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2935.58/UIView.m:8742 How am I supposed to position this UILabel to show up in the UIPageViewController ? 回答1: This seems to be happening because UIPageViewController 's

UINavigationController inside UIPageViewController with vertical scrolling, broken navigation bar height

♀尐吖头ヾ 提交于 2019-12-10 10:09:26
问题 I'm using a UIPageViewController to display few controllers, the first one is UINavigationController, on first sight it looks fine, but when you scroll to next one, the first navigation bar changes the height, and puts title directly under status bar. I've already searched stack overflow but couldn't find any answer to my problem. Simple demo: https://github.com/augard/PageScrollingBug 回答1: I fixed this in a very hacky way – subclassed UINavigationController and swizzled its navigationBar 's

UIPageviewController - Change from two page mode to one page mode without changing orientation

折月煮酒 提交于 2019-12-10 09:49:45
问题 I am using UIPageViewController to show two view controllers at a time. After showing a couple of such views, i want to show single view controllers without changing orientation, it is fixed to landscape. I am making in iPad. Below is the code i am using for this: -(id)initWithViewControllers:(NSMutableArray *)Controllers { self = [super initWithNibName:nil bundle:nil]; if(self) { self.VControllers = Controllers; pageController = [[UIPageViewController alloc]initWithTransitionStyle

Swift - UIPageViewController always repeats second ViewController

Deadly 提交于 2019-12-10 09:47:05
问题 Setup: I'm trying to create a ViewController with an embedded UIPageViewController with 4 pages that are each their own ViewController. Problem: When scrolling the second view is always repeated. For example with View1, View2, View3, View4 scrolling reveals View1, View2, View2, View3, View4 then scrolling back has this order View4, View3, View3, View2, View1 even though the page control is accurate. I've look at many tutorials online including answers here and here. Here is my page view

How do I add multiple ViewControllers to my UIPageViewController?

天涯浪子 提交于 2019-12-09 23:01:08
问题 so I'm pretty new to Obj-C and have tried looking at sample code and other online resources to answer my question, but I can't seem to find anything that really helps. Essentially what I'm trying to do is to add multiple UIViewControllers that I created in Storyboard to a UIPageViewController - the first place I looked to for help was Xcode itself by using a template of a PageBased application. That actually helped quite a lot and I got a PageController up and running. Then I turned to online

How can I add new pages to a UIPageViewController after the user has reached the last page?

心已入冬 提交于 2019-12-09 17:28:01
问题 I have a UIPageViewController that contains view controllers that are instantiated from data fetched over the network. When the user is paging and gets within a few pages of the end, I kick off a new network operation and put the resulting new view controllers onto the end of my UIPageViewControllerDataSource 's mutable array of view controllers. In general this all works pretty well. But if the network is slow (or the user is fast), it's possible to reach the final page before the network

how to make uipageviewcontroller go in circles

浪尽此生 提交于 2019-12-09 15:49:02
问题 I'm having a UIPageViewController that shows different pages. The current behaviour is that it stops scrolling when I reached the last page. What I now want to achieve is that when on the last page and scrolling right, it goes to the first page. When at the first page, go to the last page when scrolling left. So basically let the PageViewController show the pages in circles. My first approach works quite well while having more than one page, or starting with one single page: -

UIPageViewController inside of a UITableViewCell

自作多情 提交于 2019-12-08 19:46:17
问题 Hey I wanted to ask how do I implement a UIPageViewController inside of a UITableViewCell. I have been reading around, but so far nothing seems to work for anyone trying. I would appreciate some hints, no need for a full answer.. Thanks!. 回答1: It is unclear exactly what you are attempting to do, but let me see if I can explain. You want to have a page view controller view inside a table view cell. You will need to create a page view controller per cell, resize its view to the size of the cell

How can I dismiss/pop a UIPageViewController after the last view controller is swiped?

旧巷老猫 提交于 2019-12-08 16:47:25
问题 How can I dismiss/pop a UIPageViewController after the last view controller is swiped? Basically want to make a tutorial style paging view with images, and to dismiss after the user swipes to the "next" page from the last. - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { NSUInteger index = [(EmailTutorialViewController *)viewController index]; index++; if (index == 5) { [self

Making beautiful transitions at PageViewController

一个人想着一个人 提交于 2019-12-08 10:47:23
问题 I want to make custom transition with in PageViewController: while user moves to next slide (scroll) then background image slowly dissolves into another image. Such effect have Apple Weather (except there is background video). What I've done: I've made UIViewContoller with background image (that image I need to change). I've placed ContainerView in that UIViewController, that ContainerView have embed PageViewController. UIViewController -> ContainerView -> PageViewController At that point I'm