uipageviewcontroller

Unexpected UIPageViewController behaviour

女生的网名这么多〃 提交于 2019-12-04 06:56:02
I'm currently building a app using UIPageViewController . It is working as I expected until it reaches last page which contains numbers of UITextField. But when I tapped one of instances of UITextField, it suddenly jumps to the previous page without any reason instead of showing a keyboard. When I scroll through to the last page and tap a text field again, it works well without any problem. It is also fine when it shows last page immediately by tapping the navigation button that links to the last page and that is attached to the UIPageViewController instance. This problem happens only when I

How to implement UIPageViewController with a UIScrollView?

♀尐吖头ヾ 提交于 2019-12-04 05:21:52
问题 I took the Photo Scroller example from Apple's website and tried to implement my own Album by copying the code. Now, the UIScrollView is not visible. How do I make it appear? The only code change that I made was in creating the UIPageViewController . In my case, it's a UIViewController that is opening it and not the AppDelegate . @implementation BasePhotoViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nil bundle

Preload next page in UIPageViewController

好久不见. 提交于 2019-12-04 05:13:49
I've looked many, many places and have yet to find some good sample code showing how to pre-load the "next" page in a UIPageViewController. There are a few answers on SO detailing some theoretical ways to do it (see this question ) but no one has yet to post a working example. In the workflow of my app I'm showing 1 page per screen and I want to have the "next" screen preloaded because as it is, swiping to the next page can be very slow, sometimes requiring 2 swipes (if you swipe too fast) in order for the next page to be rendered and shown. This provides a bad user experience. I don't really

UIPageViewController with Peeking

眉间皱痕 提交于 2019-12-04 05:13:16
I'm trying to create a page browser by using a UIPageViewController in Interface Builder that allows displaying part of the adjacent pages (aka peeking). I've been following a tutorial at http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/ (and ported it into Swift) which is rather straightforward but I can't quite figure out what changes to make to have a page displayed in the UIPageViewController which is smaller than the screen (and centered) and having the adjacent pages appear partly on the screen left and right. I've tried to resize the page content view controller in IB and

Page Indicator UIPageViewController

烈酒焚心 提交于 2019-12-04 05:04:37
问题 I have a page view controller in my iPhone app. The view is defined using the Interface Builder and a class to manage it. This class extends UIPageViewController <UIPageViewControllerDataSource,UIPageViewControllerDelegate> I used the following functions for page indicator. -(NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController {} -(NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController {} However, the number of pages

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

依然范特西╮ 提交于 2019-12-04 04:21:41
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 operation has completed. Since pageViewController:viewControllerAfterViewController: gets called when the

how to make uipageviewcontroller go in circles

ぐ巨炮叔叔 提交于 2019-12-04 03:51:51
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: - (UIViewController*) pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:

Hide dots on final page of UIPageViewController swift

这一生的挚爱 提交于 2019-12-04 02:03:53
问题 I have four pages in a UIPageViewController, and I'd like to hide the dots on the last page. I successfully made a function that gets called on the last page of the UIPageViewController. Basically, if the current view is the last one, it is called. But what do I put in that function to hide the dots temporarily? I found this https://stackoverflow.com/a/32016614/5700898 but it doesn't help with what goes inside that function. The normal method (hiding page dots on all pages), is not what I

Set timer to UIPageViewController

一世执手 提交于 2019-12-03 21:36:31
I'm trying to have the UIPageViewController navigate through the pages for every 5 seconds. How to do this in Swift? Is there any way to explicitly call viewControllerAfterViewController ? var timer = NSTimer.scheduledTimerWithTimeInterval(5, target: self, selector: Selector("update"), userInfo: nil, repeats: true) func update() -> UIViewController { // can u please tell me what to add here } func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? { var index = (viewController as

Preloading pages of UIPageViewController

拈花ヽ惹草 提交于 2019-12-03 18:28:21
问题 I can't find a good solution to having the UIPageViewController preload the surrounding ViewControllers. Right now what happens is when the user starts to turn the page, nothing happens, the code calls - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController and once its loaded thennnn it shows the animation. This takes too long and is not smooth. Anyone have a solution? 回答1: Create a mutable