uipageviewcontroller

UIPageViewController NSInternalInconsistencyException

十年热恋 提交于 2019-12-21 04:04:34
问题 I'm developing a simple UIPageViewController that has two pages. Each page is loaded from a different ViewController with their specific xib files, named PViewController and TViewController . For PViewController , there are three different views, let's call them A , B , and C . When the application launches, PViewController appears successfully and I can swipe left to see the TViewController , also with no problems. However, when I'm in PViewController and as a response to an event I change

PageViewController - Pass variables to child views

别说谁变了你拦得住时间么 提交于 2019-12-21 02:25:05
问题 What I have I have a ViewController (TutorialViewController) and a UIPageViewController (TutorialPageViewController). There are also 3 extra views on the storyboard with StoryBoard ID's: GreenViewController BlueViewController RedViewController I have been following this tutorial (Kudos to the author, very well written). On the Green View Controller I have defined a variable: var passedVariable = "" And in the ViewDidLoad I print it out. Here are the two controllers that have the code:

How to add UIBarButtonItem to NavigationBar while using UIPageViewController

北慕城南 提交于 2019-12-20 14:08:13
问题 Please forgive me, there are already a ton of questions on how to add a UIBarButtonItem to a NavigationBar programmatically but I just can't seem to get any of the solutions to work in my situation. Here is the layout of a simple test app I have been working with to learn the UIPageViewController. I have the page view controller working nicely with three unique viewControllers. I would now like to set unique rightBarButtonItems for each of the view controllers. I can easily set a common

How to add UIBarButtonItem to NavigationBar while using UIPageViewController

淺唱寂寞╮ 提交于 2019-12-20 14:07:22
问题 Please forgive me, there are already a ton of questions on how to add a UIBarButtonItem to a NavigationBar programmatically but I just can't seem to get any of the solutions to work in my situation. Here is the layout of a simple test app I have been working with to learn the UIPageViewController. I have the page view controller working nicely with three unique viewControllers. I would now like to set unique rightBarButtonItems for each of the view controllers. I can easily set a common

uipageviewcontroller class crashing on setting more than one view controllers

冷暖自知 提交于 2019-12-20 10:18:21
问题 My app keeps crashing, when I set more than one view controller in my app, like below. [self setViewControllers:_images direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:NULL]; My images is an array of view controllers. The app crashes saying the following error. I have no idea where to start. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The number of view controllers provided (9) doesn't match the number required (1) for the

In PageViewController navigation not working

你说的曾经没有我的故事 提交于 2019-12-20 06:13:46
问题 I have 3 types of VC's , 1st Vc, 2nd VC is PageViewController with 3 pages(I added PageController to normal ViewController here), third one is FinalViewController . 1st VC has button when i click it will move to 2nd VC that is PageViewController (It has 3 pages[3 ViewConrollers ] working fine). In PageViewController after loading first VC, it has view with gestures when i tap that i want to navigate FinalViewController completely. Here navigation not working. My 1st VC code override func

In PageViewController navigation not working

若如初见. 提交于 2019-12-20 06:13:01
问题 I have 3 types of VC's , 1st Vc, 2nd VC is PageViewController with 3 pages(I added PageController to normal ViewController here), third one is FinalViewController . 1st VC has button when i click it will move to 2nd VC that is PageViewController (It has 3 pages[3 ViewConrollers ] working fine). In PageViewController after loading first VC, it has view with gestures when i tap that i want to navigate FinalViewController completely. Here navigation not working. My 1st VC code override func

Correct way to load a background image for a Page Based application in iOS 5?

左心房为你撑大大i 提交于 2019-12-20 04:54:09
问题 I'm working on an iBooks type of app for iOS 5 and have everything working except for the background image. Specifically in landscape mode. Up to this point I've been using: UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"book.png"]]; [self.view addSubview:background]; [self.view sendSubviewToBack:background]; If I do this on the RootViewController, the spine obviously doesn't show through the page view controller's view and if I use this inside the page

UIScrollView cancels UIPageViewController gestures when scrolling

穿精又带淫゛_ 提交于 2019-12-19 08:39:05
问题 I have a UIPageViewController that handles turning the pages of my "book". However, each book page is a ViewController with a UIScrollView as a subview . The UIScrollView is only able to scroll vertically due to the contentSize . The problem is that while the user scrolls the scrollview vertically, as the scrollview is still scrolling/decelerating the user can not turn the page. A very easy way to see this is to scroll the page and then try to tap the edge of the view. This would normally

How can you provide default implementations for UIPageViewControllerDataSource?

前提是你 提交于 2019-12-19 04:09:44
问题 I assume that the answer to this question will address issues with Objective-C protocols in general, but this is the first problem of this type that I've come across. I expect for these methods to be used, when implementing UIPageViewControllerDataSourceWithConnections . import UIKit protocol UIPageViewControllerDataSourceWithConnections: UIPageViewControllerDataSource { var connectedViewControllers: [UIViewController] {get} } extension UIPageViewControllerDataSourceWithConnections { func