Questions tagged [uipageviewcontroller]

UIPageViewController is an iOS container view controller that manages the display one of one or more content view controllers. It provides the ability the change of the controller via swipe gestures and also supports animated transitions.

UIPageViewController is a container view controller that manages navigation between pages of content, where each page is managed by a child view controller.

A UIPageViewController lets the user navigate between pages of content, where each page is managed by its own view controller object. Navigation can be controlled programmatically or directly by the user using swipe gestures. When navigating from page to page, the page view controller uses the transition that you specify to animate the change.

Important

In tvOS, the UIPageViewController class provides only a way to swipe between full-screen content pages. Unlike in iOS, a user cannot interact with or move focus between items on each page.

References:

2071 questions
25
votes
2 answers

how to make UIPageViewController reuse controller like tableview reuse cell?

I need a way to make UIPageViewController reuse controllers to save memory, because I have a huge number of pages to show! I did the basic implementation of the UIPageViewController but couldn't manage to make controller reusable, please advice!
M.Alatrash
  • 1,270
  • 1
  • 12
  • 30
25
votes
3 answers

iOS 8 / XCode 6 autolayout constraints applied after view appears

I have a project that was working just fine with XCode 5 and iOS 7, but when I recently downloaded XCode 6, I noticed some weird behavior with autolayout. I have a storyboard with a view that just has a UIImageView and two UILabels. This view gets…
wuc
  • 251
  • 3
  • 3
25
votes
7 answers

Accessing variables from another ViewController in Swift

I have the following ViewController: class PageContentViewController: UIViewController { var pageIndex: Int } How would I access pageIndex from another ViewController? I need to access pageIndex in this function: func…
gotnull
  • 26,454
  • 22
  • 137
  • 203
25
votes
3 answers

Changing UIPageViewController own PageController regarding Color of Dots

Hey I'm using a UIPageViewController to control what page I am on and for scrolling. I know it's possible to show a Page Controller along with it by simply adding the following two functions. -…
Lightbarrier
  • 361
  • 1
  • 4
  • 8
24
votes
5 answers

UIPageViewController prevents my table view from scrolling to top when tapping the status bar

I searched before posting this question, but couldn't find anything. I'm having a huge issue. I have a scrolling type UIPageViewController as the basis of my app, with 3 view controllers. One of the view controller's (listTableView) has a table view…
24
votes
3 answers

Using View Controller from storyboard programmatically in a Page View Controller

I have an app with a storyboard. I am using several View Controller with segues to choose from a table view depending on the item selected. I want to have a page view controller in which the pages will be one or more view controller from the…
Laure_f_o
  • 628
  • 1
  • 7
  • 15
22
votes
3 answers

Can I disable the UIPageViewController's page border gesture recognizers? And keep the swipe one?

I see that I can remove all of the UIPageViewController gestures, but what if I only want to remove the tap gesture on the edges? And keep the swipe gesture? Is this possible? Thanks
Westley
  • 1,143
  • 14
  • 27
21
votes
1 answer

What exactly spine is in UIPageViewController?

The iOS doc says that we can present one or 2 pages at a time depending on the spine location or position and double sided state... But, I am unable to understand "What exactly spine is in UIPageViewController ?"
aMother
  • 893
  • 8
  • 19
20
votes
5 answers

UIPageViewController in iOS6

In iOS6 in the methods viewControllerAfterViewController and viewControllerBeforeViewController if I return nil (for block the page navigation when I am in the first or last page) the app crash with this exception: 'The number of view controllers…
matti157
  • 1,288
  • 2
  • 13
  • 26
19
votes
6 answers

How can i know if UIPageViewController flipped forward or reversed?

I have a UIPageViewController and I just can not figure out how to know to what direction the user turned the page so i can set the page count appropriately. Thanks Shani
shannoga
  • 19,649
  • 20
  • 104
  • 169
19
votes
6 answers

Assertion failure in UIPageViewController

I have an Assertion Failure in UIPageViewController. Assertion failure in -[UIPageViewController _flushViewController:animated:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.12/UIPageViewController.m Terminating app due to…
appchemist
  • 345
  • 2
  • 3
  • 11
19
votes
2 answers

UICollectionView horizontal paging with space between pages

I'm looking for a way to replace the native UIPageViewController horizontal paging with a UICollectionView. so far i did the following: let layout = UICollectionViewFlowLayout() layout.scrollDirection = .horizontal layout.itemSize =…
Eyal
  • 10,777
  • 18
  • 78
  • 130
19
votes
14 answers

How to change position of UIPageControl in iOS >=8.0?

I have a simple UIPageViewController which displays the default UIPageControl at the bottom of the pages. I wonder if it's possible to modify the position of the UIPageControl, e.g. to be on top of the screen instead of the bottom. I've been looking…
Nguyen Thu
  • 193
  • 1
  • 1
  • 4
19
votes
2 answers

UIPageViewController didFinishAnimating not called if swiped quickly

I have a UIPageViewController that works as expected. I can scroll left and right and the delegate method didFinishAnimating is called when I scroll each direction. However, if I scroll too quickly I end up on a page where didFinishAnimating is not…
mattnedrich
  • 7,577
  • 9
  • 39
  • 45
19
votes
4 answers

UIPageViewController within NavigationController

I've read every tutorial I've found about UIPageViewController, but they show just basics, I'd like to create something like new twitter app has: UIPageViewController is embedded into Navigation controller, title of navigation bar is based on…
Adam Bardon
  • 3,829
  • 7
  • 38
  • 73