Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7665497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:34:57+00:00 2026-05-31T14:34:57+00:00

I have a UIPageViewController with several pages. Each page is the same view controller,

  • 0

I have a UIPageViewController with several pages. Each page is the same view controller, but the page number is kept track of and the correct page of a PDF is shown. The problem is that each PDF page needs to be loaded and drawn before the curl effect works (you slide your finger across the screen and nothing happens until loaded). Any ideas on how to speed this up or preload the next page? Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:34:59+00:00Added an answer on May 31, 2026 at 2:34 pm

    I have a similar problem in the app I am using now. My solution was to keep a reference to the loaded previous and next controllers as properties of my root view controller, and then just load the view from there. I don’t use PageViewController because the client insisted it had to look like FlipBoard…so I also cache the resulting GLTexture. It should work similarly though, just store the next and previous page when the current one loads, and pass that controller in your “loadNextPage” or whatever method.

    EDIT: Here is a sample (that I’ve simplified) from my project

    First Load (NH is a prefix for my program, so you will need to substitute your own classes):

    NHViewController *child = [NHViewController loadPageNum:actualNum];
    [self.view addSubview:child.view];
    self.curController = child;
    child.delegate = self;
    [self initializePages:NHPageLoadBoth];
    

    Subsequent loads (page flip):

        NHPageLoadSettings pageToLoad = NHPageLoadNext;
        if(direction == NHPageDirectionNextPage)
        {
            self.prevController = self.curController;
            self.curController = self.nextController;
            self.nextController = nil;
        }
        else
        {
            self.nextController = self.curController;
            self.curController = self.prevController;
            self.prevController = nil;
            pageToLoad = NHPageLoadPrev;
        }
    
        UIView *nextView = self.curController.view;
        [self.view addSubview:nextView];
        [mCurView removeFromSuperview];
        mCurView = nextView;
    
        [self initializePages:pageToLoad];
    

    Initialize Pages:

    - (void)initializePages:(NHPageLoadSettings)pagesToLoad
    {
        if(pagesToLoad & NHPageLoadNext)
        {
            NSUInteger nextPageNum = [self.curController.pageNum unsignedIntegerValue]+1;
            self.nextController = [NHViewController loadPageNum:nextPageNum];
        }
        if(pagesToLoad & NHPageLoadPrev)
        {
            NSUInteger prevPageNum = [self.curController.pageNum unsignedIntegerValue]-1;
            self.prevController = [NHViewController loadPageNum:prevPageNum];
        }
    }
    

    This way, you will always have the neighbor pages ready. Then instead of instantiating them in the method that retrieves the next or previous page in UIPageViewController, simply pass self.nextController, or self.prevController.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIPageViewController load with my Viewcontroller. The view controllers have buttons which
I am trying to use a UIPageViewController to create a book app. Each page
How do you know what is the current page/view displayed inside an UIPageViewController ?
Have you determined a maximum number of characters allowed in FCKEditor ? I seem
I have several buttons positioned on my ViewController within the area covered by the
I want to switch between multiple view controllers with a UIPageViewController . These view
Have converted devise new session from erb to Haml but doens't work, this is
Have searched the database but need to specifically sum(of hours flown or days off)in
I'm creating an app to show a book by using UIPageViewController (to have the
I'm using an UIPageViewController in my application and I wanted to have a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.