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 8051425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:18:04+00:00 2026-06-05T07:18:04+00:00

I am using a UIPageViewContoller to create a book-like page turning experience. The pages

  • 0

I am using a UIPageViewContoller to create a book-like page turning experience. The pages for my book are 18px narrower than the full width of the iPhone screen and are anchored on the left side of the screen. The frame for my UIPageViewController’s view is then set to the frame size of these pages (width:302, height:460). I do this to give an effect that the book has multiple pages and for the page turn to look like it starts from the edge of the current visible page, just like the experience in the iBooks app.

The issue I am having is if someone tries to turn a page by panning from the far right of the screen, past the 302 px point, the pan gesture is not captured by the UIPageViewController and the page is not turned. I have watched a lot of users try to turn a page this way so I would like to fix this experience without changing the UI design.

My thinking is that I can grab the UIPanGesture from the area outside of the UIPageViewController and pass it to the UIPageViewController. I’ve successfully captured the pan gesture using an image view I have as the background of the whole view, but I can’t figure out how to pass the gesture to the UIPageViewController to handle the page turn.

- (void) viewDidLoad {
...    

    // Add a swipe gesture recognizer to grab page flip swipes that start from the far right of the screen, past the edge of the book page
    self.panGesture = [[[UIPanGestureRecognizer alloc] initWithTarget:self action:nil] autorelease];
    [self.panGesture setDelegate:self];
    [self.iv_background addGestureRecognizer:self.panGesture];

    //enable gesture events on the background image
    [self.iv_background setUserInteractionEnabled:YES];

...
}


#pragma mark - UIGestureRecognizer Delegates
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
    // test if our control subview is on-screen
    if (self.pageController.view.superview != nil) {
       if (gestureRecognizer == self.panGesture) {
            // we touched background of the BookViewController, pass the pan to the UIPageViewController
            [self.pageController.view touchesBegan:[NSSet setWithObject:touch] withEvent:UIEventTypeTouches];

            return YES; // handle the touch
        }
    }
    return YES; // handle the touch
}
  • 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-06-05T07:18:06+00:00Added an answer on June 5, 2026 at 7:18 am

    UIPageViewController has a gestureRecognizers property. The documentation seems to describe exactly what you’re looking for:

    gestureRecognizers

    An array of UIGestureRecognizer objects that are configured to handle
    user interaction. (read-only)

    @property(nonatomic, readonly) NSArray *gestureRecognizers

    Discussion

    These gesture recognizers are initially attached to a view in the page
    view controller’s hierarchy. To change the region of the screen in
    which the user can navigate using gestures, they can be placed on
    another view.

    Availability

    Available in iOS 5.0 and later. Declared In

    UIPageViewController.h

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

Sidebar

Related Questions

I just implemented a view in my iPhone app using UIPageViewController. The page turning
I am new to trying to create a book app adapting the page-based application
Using Jenkins or Hudson I would like to create a pipeline of builds with
I am trying to use a UIPageViewController to create a book app. Each page
I'm creating a project using UIPageViewController for the page turning effect. I'm using storyboard,
I am using the iBook like page turn transition ( UIPageViewControllerTransitionStylePageCurl ) to navigate
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
Using a restful resource in Rails, I would like to be able to insert
Using Flex 3, I would like to take an image snapshot such as this:
I would like to know how can I display on each pages of an

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.