FAQ Database Discussion Community


pageViewController content jumping

ios,objective-c,uipageviewcontroller
I have a UIViewController which I have set as the UIPageViewControllerDataSource, as it sits things work great -- with 1 little caveat. Here's some images to display the issue I have. First image is the first controller in the stack of controllers. Then, I start to scroll and we see...

iOS: right swipe gesture not responding in UIPageViewController

ios,objective-c,uipageviewcontroller,uiswipegesturerecognizer
I am currently facing a scenario that I am using a UIPageViewController on a view & I want the right swipe gesture to work when user swipe right side from index value 0, so I am trying to add a right swipe gesture to UIPageViewController by the following code: UISwipeGestureRecognizer...

Swift ios not sure on how to connect or use an embedded UIPageViewController

ios,swift,uiviewcontroller,segue,uipageviewcontroller
I decided to drop my UIImageView and instead use an UIPageViewController so that users can swipe between images on the same page. What I have now is a normal UIViewController, in that I added a containerView in which I have embedded a UIPageViewController. So the UIPageViewController acts as a childview...

Disable and Reenable Page View Controller gesture recogniser?

ios,objective-c,uipageviewcontroller,uiswipegesturerecognizer
I have a page view controller that the user can swipe between views. I want to stop the user from being able to swipe between the views ridiculously fast by temporarily disabling then reenabling the page view controller gesture recogniser. How can I programmatically disable and reenable the page view...

Display Modal ViewController in PageViewController

ios,swift,modal-dialog,uipageviewcontroller
I have a master page in my application that is based on PageViewController. On that master page I have a side bar that provides options to the user. One of the options is to display "About" information regarding the application. When the user click the About button in the side...

UIViewControllers being reused in UIPageViewController

ios,objective-c,uipageviewcontroller
I have a UIPageVIewController and I am initialising the controllers inside using the reuse identifier i.e: BaseContentViewController *contentViewController = (BaseContentViewController *)[self.storyboard instantiateViewControllerWithIdentifier:self.controllerRestorationIDs[index]]; I have noticed that if a UIViewController is reused then viewDidLoad is not called in that controller so any code that I want to be executed every single...

Page View Controller :custom page slider

ios,swift,uipageviewcontroller
I am trying to implement a feature using PageViewController in iOS Swift language. In my scenario there will be images on all views associated with PageViewController. I will have buttons on top of images, (refer to example app's screenshot.) How can I implement that with change of page only the...

UIPageViewController intermediate transitions programmatically?

ios,objective-c,swift,uipageviewcontroller
I have a UIPageViewController with n (n>>2) pages. The first page is yellow and the second one is blue. When I drag from one page to another I get a nice animation for the intermediate states as shown in the following image: I tried to make to page transition from...

Swift UIPageViewController & UIActivityIndicatorView

ios,swift,uipageviewcontroller
Is anyone aware of an issue with stopping a UIActivityIndicatorView (AI) / removing a UIView that has been added to a UIPageViewController? I am showing the AI using: override func viewWillLayoutSubviews() { actInd.frame = CGRectMake(0,0, 80, 80) actInd.center.x = self.view.center.x actInd.center.y = self.view.center.y - 40 actInd.hidesWhenStopped = true actInd.layer.cornerRadius =...

Getting UITextField value in UIPageViewController

ios,objective-c,uipageviewcontroller
It's my first question here so please bear with me, (I was searching for days but I can’t find any answer! T.T) I am also a newbie on IOS development, so sorry if I get the terms wrong, I need to get the value of UITextField in my app. I...

UIPageViewController with a last view without page indicator

ios,swipe,uipageviewcontroller
I would like to have 4 views that the user can swipe left or right. For this I am planning to use UIPageViewController. What is special is that the last view should not have the page indicator at all. I would like to swipe it away with the view that...

Strange constraint behaviour in UIPageViewController

ios,objective-c,cocoa-touch,uipageviewcontroller,nslayoutconstraint
In storyboard I have UINavigationController without navigation bar and with root view controller UIPageViewController that has 2 children: LoginVC and ChoosePlaceVC. MainPageVC is a simple subclass of UIPageViewController where I just set [self setViewControllers:@[loginVC] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil]; In Login ViewController I set constraint to top for logo image to 0...

iOS Swift - Change UIPageViewController page using UISegmentedControl

ios,swift,uisegmentedcontrol,uipageviewcontroller
I finnaly synchronized my segmentedController to the UIPageViewController in this way: when I swipe between pages, the segmented controller changes it's segment index. I want to know how to do the reverse too, when segmentedController's segment is tapped, to change the pageViewController page by segmentedController index. Here is my code:...

UIPageViewController Implementation - Black Screen After Changing View Controllers

ios,swift,uiviewcontroller,uipageviewcontroller
Trying to successfully implement an app that allows users to scroll between UIViewControllers using a UIPageViewController. Currently, after swiping to the second UIViewController, the screen goes black and I cannot scroll anymore. Any ideas? Here is my subclassed UIPageViewController code: class ApplicationViewController: UIPageViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate { var registrationController : UIViewController!...

UIPageViewController and different view controllers

ios,objective-c,uipageviewcontroller
I am trying to implement a UIPageViewController. I have done this before but using the same UIViewController and changing the images etc when paging. I want to page between different UIViewController now. I'm trying to code the method that creates the UIViewController based on what is in an array that...

Why can't my page controller scroll infinitely backwards?

ios,objective-c,uipageviewcontroller,infinite-scroll
I have created a page controller that has three view controllers that can scroll infinitely forward (eg: 1 -> 2 -> 3 -> 1 -> etc) however when I am on the first view controller and try to scroll backwards it goes to a white screen and doesn't scroll backwards...

UIPageViewControler get current number page from didFinishAnimating method?

objective-c,uipageviewcontroller
There is some way to bring from this method the current page I am in ? -(void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed – ...

Next Page Button for UIPageViewController iOS 8 - objC

ios,objective-c,button,uipageviewcontroller
Actually I'm trying to populate gallery using PageViewController. I brought scrolling images in a view successfully but, I used Next and Previous button in page View Controller its not working properly i used this line of code. - (IBAction)previousButtonPressed:(id)sender { PageContentViewController *startingViewController = [self viewControllerAtIndex:0]; NSArray *viewControllers = @[startingViewController]; [self.pageViewController...

Why does my method call twice?

ios,objective-c,uipageviewcontroller
I have a method in my page view controller class thats meant to produce a set of numbers once, but instead it seems to fire twice for some reason? Can anyone tell me why its firing twice? This is what the console fires What is happening, why isnt it working...

How to trigger animation on PageViewController page swipe

ios,swipe,uipageviewcontroller
I need to animate view translation from A to B on the screen. However, I want that translation to occur when a user swipes his thumb on the screen. I also want translation to depend on the thumb swipe in a way that they follow one another. I assume I...

Adding am UIPageViewController in front of a UIViewController

ios,swift,uiviewcontroller,uipageviewcontroller
When my app starts for the first time it should display a tutorial, which are some screens with a semitransparent background, in front of the first app screen. I tried creating an UIPageViewController object, adding its view as subview of the current screen (self.view.addSubview(tutorialViewController.view)) and the screen is displayed, however...

How to blend CGGradients together in PageViewController?

ios,objective-c,gradient,uipageviewcontroller
I have a UIPageViewController with 4 pages, by taking the sample from here: http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/ and removing the set images and adding in custom gradients for each view. Let's say that page 1 is red/yellow, page 2 is yellow/blue, etc, so what I want is when the transition happens between page...

How to catch page swipe event in IOS Swift

ios,swift,uipageviewcontroller
I have developed swiping pages using UIPageViewController IOS Swift. I need to do some stuff when last page come up. How to catch page swipe event. import UIKit class ViewController: UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate{ var pageViewController : UIPageViewController! var pageCount = 3 func pageViewController(pageViewController: UIPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {...

IOS How to access uipageviewcontroller from its children?

ios,uipageviewcontroller
I have the below classes, the first contains an instance of UIPageViewController and the second is the view controller of the childs @interface GuidePager : UIViewController <UIPageViewControllerDataSource, UIPageViewControllerDelegate> @property (strong, nonatomic) UIPageViewController *pageController; @property NSArray *viewControllers; - (void)flipToPage:(NSString *)index; @end AND @interface GuidePagerChild : UIViewController <UIWebViewDelegate> @end I need to...

Convert Obj C code to Swift weak self

objective-c,swift,uipageviewcontroller,weak-references,self-reference
I am using the code here but I'm having difficulty to convert the __weak __typeof(self) weakSelf = self; to Swift. Is there a way for me to convert the following code into Swift? I'm stucked convert to Swift even after reading the material said that [unowned self] or [weak self]....

iOS - Pass Data Multiple Times From Parent View Into Container View's View

ios,objective-c,uipageviewcontroller,uicontainerview
I have a UIPageViewController, and one of its View Controllers has a Container View where its parent View Controller passes data into it so the container can display dynamic data. I currently have the parent view passing data into the view within the container view with this prepareForSegue method: //In...

How to change label.text located in UIPageViewController's ViewController? swift ios xcode

ios,xcode,swift,uipageviewcontroller
This is the structure of my project UIViewController holding: UIPageViewController holding: UIViewController1 - holds UILabel UIViewController2 - holds UILabel UIViewController3 - holds UILabel If I want to update UILabel.text inside UIViewController1, How can I access that UILabel? or what if I want to change UILable inside UIViewController2?...

UIPageViewController UIImage not showing full screen

ios,uiimage,fullscreen,uipageviewcontroller,tabview
I am making an application that is a tab-view controller. For the first tab, I have a UIPageViewController that is scrolling through pictures. Everything works properly, except for that the picture is not showing full screen. I have constraints set up for the image view to cover the whole view...

Creating a pageViewController with a segmentController below navigationController

ios,swift,uipageviewcontroller
I'm trying to create pageViewController which have several tableViewControllers however i want to create a navigation between the tableViews, so therefor i want a segmentController below the navigationController like this. the segmentController is created through a subclass and then in a toolbar? how can i add such a segmentController below...

UIPageViewController with multiple views

ios,objective-c,iphone,uipageviewcontroller
I need a dynamic UIPageViewController, the number of pages depends on the quantity of items of my array. I have two views for this. One for the first page and another one for the other pages. It will be always more than 2 pages (two items on my array). I'm...

IOS - How to create a UIPageViewController with multiple ViewController from different XIB files

ios,xcode,swift,uiviewcontroller,uipageviewcontroller
My main controller has a UIPageViewController. I want to swipe across differently structured views, so I can't use the same controller. Also, I don't want to pollute the main storyboard. I want to have different XIB files with custom controllers. So far so good. I want to be able to...

PageViewController crash setViewControllers

swift,uipageviewcontroller
I have PageViewController and I want to show viewControllerAtIndex here is my code: let startingViewController: MyPages = self.viewControllerAtIndex(0, storyboard: self.storyboard!)! let viewControllers: NSArray = [startingViewController] pageViewController.setViewControllers(viewControllers as [AnyObject], direction: .Forward, animated: false, completion: nil) but my app crash with Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]:...

IBAction function does not fire in class that inherits from UIPageViewControllerDataSource

ios,swift,uipageviewcontroller,ibaction
I have the following class definition and IBAction. The class is the class I am using for root / first / master "page" in my UIPageViewController set. (i.e. the master UIPageController that all the other controllers are loaded into.) import UIKit class MasterPageViewController: UIViewController, UIPageViewControllerDataSource, SideBarDelegate { var iobj_NearbyPlacesViewController: NearbyPlacesViewController!...

How to get pending view controller from method?

ios,objective-c,xcode,uipageviewcontroller,pending-transition
How can I get the pending view controller value from this method? -(void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray *)pendingViewControllers { } What is the code I can use to get the pending view controller value from this array? Any help would be greatly appreciated? I have tried using this code: nextIndex = (int)[pendingViewControllers...

Disable UIPageViewController bouncing - Swift

ios,swift,uiscrollview,uipageviewcontroller
I've been making a sample app with scrolling between UIViewControllers but the point is i want to disable the bouncing effect at the end of scrolling and when going back to the first UIViewController. here is my code : class PageViewController: UIPageViewController,UIPageViewControllerDataSource, UIPageViewControllerDelegate{ var index = 0 var identifiers: NSArray...

How to make Image page viewer for images swift ios

ios,swift,uiimageview,uiimage,uipageviewcontroller
I wanna display a couple of images from the assets folders, into my application. so I wanna make a page view. First, images will be inside collection view, then on click, the image will be full screen. Then the user can slide between the images by swiping right and left...

UIPageViewController with one constant background image

ios,swift,uiview,uiscrollview,uipageviewcontroller
I want a PageViewController that just has one constant background. Kind of similar to the tutorial in Evernote's iOS app. I was thinking about making the UIPageViewController's background transparent and each view in the page controller transparent as well but I don't think its working. Any ideas?...

iOS Swift: UIPageViewController - Turning page programatically

ios,swift,uiviewcontroller,uipageviewcontroller
I have a UIPageViewController, which works fine when we swipe left or right to turn pages. class ViewController: UIViewController, UIPageViewControllerDataSource { ... } Now i intend to provide Previous/Next button on the page too, so that pages can be turned by clicking on these buttons. How can i trigger the...

Black status bar on startup iOS8 using UIPageViewController

ios,uiviewcontroller,ios8,uinavigationbar,uipageviewcontroller
I'm using https://github.com/cwRichardKim/RKSwipeBetweenViewControllers/issues to do swiping in between views. Things are good, except for when I first launch the app, there is a black bar where the status bar should be. Not enough reputation for images so here's a link If I touch the screen at all, the navigation bar...

UIPageViewController not loading page content after accessing UITableView content

ios,objective-c,uitableview,delegates,uipageviewcontroller
This is likely a noob question about the PageViewControllers or general management of my views. I have a PageViewController that allows me to swipe through... well, you know what it does. On each of these dynamic pages, I have a label that gives a current game status message and an...

Animations in UIPageViewController

ios,swift,uipageviewcontroller
How can I create such "animations" or custom transitions between views in UIPageViewController as you can see in this video: https://drive.google.com/file/d/0B0395LXtwCBfQ3N4eEJ6cnQtQms/view?usp=sharing

UIPageViewController and setViewControllers:

ios,objective-c,uipageviewcontroller
I am having trouble understanding this line of code when I setup my UIPageViewController: [self.pageViewController setViewControllers:@[startingViewController] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:^(BOOL finished) { // Completion code }]; In most of the examples I have seen just a single UIViewController is passed into the setViewControllers and then the next one initiated using (UIViewController...

Swift/iOS8: Why are Page Control indicators not showing?

ios,swift,uipageviewcontroller,uipagecontrol
I am implementing a straightforward gallery view controller where the app displays a small range of full-screen images that the user can scroll through. I'm using UIPageViewController which I thought, should display the Page Control indicators automatically if I implement the correct datasource functions. However I still cannot see any...

Objective C: NavigationBar for PageViewController

objective-c,uipageviewcontroller
I have a UITableViewController was added to a UIPageViewController as the pages, the program push PageViewController and show UINavigationBar on the top of the PageViewController, I want to add UIBarButton to UINavigationBar to control UITableViewCells, but can only do it on the screen of PageViewController, that means, all events related...

make image view full screen in view controller/page view controller (swift)

ios,swift,uistoryboard,uipageviewcontroller,xcode-storyboard
I am using UIPageViewController to show images full screen. Issue is the images are not showing full screen. Instead there is a gap on the bottom between the image and the page control view dots and on the top. I have a UIViewController which is added to UIPageController as a...

How to load data for next page using UIPageViewController

ios,objective-c,uitableview,uipageviewcontroller
I got UIPageViewController working finally a few days ago. I am using different UITableViewControllers as the "pages". There is a slight problem that i have that i want to fix. When i scroll, the view is empty until fetches the new data which i don't like. I would like the...

Swift - Swipe between multiple view controllers using UIPageViewController

ios,swift,xcode6,uipageviewcontroller
My UIPageViewController not working at all. What I'm trying to do is switch 2 view controllers inside UIPageViewController. I already followed guideline here but fail. Using UIPageViewController with swift and multiple view controllers. First view controller appeared successful but when I tried swipe to second view controller it throw this...

UIPageControl Current page indicator switches before new view is presented

ios,objective-c,iphone,uipageviewcontroller,uipagecontrol
I have implemented a niceUIPageViewControl with aPageControl. When swiping the indicator changes and shows the correct current page. However i noticed that all that it takes for the current page indicator to switch is to start swiping. Meaning if i start swiping but then let go of the finger the...

Why the UIButton is so big in a simulator?

xcode,swift,uibutton,uipageviewcontroller
I have a UIPageViewController and a UIButton under it. Here is the screenshot of my storyboard. When I build the app, the button is huge: All of my constraints were set automatically. I tried to specify the height, but it doesn't help. Any ideas? P.S. I'm using XCode 6.3. Edit:...

PageViewController in Swift, index keeps evaluating to nil

ios,swift,uipageviewcontroller
I took one of the most popular online tutorial ( http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/ ) about making UIPageViewController with Storyboard and tried to convert it into Swift. As one could expect, I encountered some issues. Here is my code: PageContentViewController.swift import UIKit class PageContentViewController: UIViewController { @IBOutlet weak var backgroundImageView: UIImageView! @IBOutlet weak...