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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:31:27+00:00 2026-06-12T05:31:27+00:00

I am attempting to implement a UIScrollView where horizontally panning scrolls through pictures in

  • 0

I am attempting to implement a UIScrollView where horizontally panning scrolls through pictures in the scrollview but vertically panning performs another action I have. Right now I have a UIScrollView that is paginated with vertical scrolling disabled that works just fine for scrolling through pictures, but am going crazy trying to find a way to intercept vertical pans and call my own method instead of the vertical pans just being eaten up by the scrollview. I was able to do

    UIPanGestureRecognizer *panUp = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanGesture:)];
[self.scrollView addGestureRecognizer:panUp];
[scrollView.panGestureRecognizer setEnabled:NO];

Which gives me total control over the panning in my handlePanGesture: method, but this isn’t particularly helpful because then I feel like I am essentially going to be rewriting all the scrolling logic which I am trying to avoid. Any help or guidance on how to achieve this would be greatly appreciated.

Thanks!

  • 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-12T05:31:29+00:00Added an answer on June 12, 2026 at 5:31 am

    I think this will be difficult if you want to use a pan gesture because of the scroll view’s use of those gestures. However, if you could use a swipe, it is easy to implement.

        UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanGesture:)];
        swipe.direction = UISwipeGestureRecognizerDirectionDown | UISwipeGestureRecognizerDirectionUp;
        [self.scrollView addGestureRecognizer:swipe];
    

    I tested this, and it worked fine to call the handler, and you don’t need to disable the scroll view’s pan gesture recognizer (in my test, the scroll view was tall enough and the content short enough that there was no vertical scrolling — I don’t know if this is necessary or not).

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

Sidebar

Related Questions

I am attempting to implement the Functor fmap over a Data.Map.Map, but I am
I'm attempting to implement a phpBB library into Kohana. I have created a vendor
I am attempting to implement a pagination bar above a table. I have a
I have been attempting to implement a custom dojo build to replace the dojo
Im attempting to implement an RSA encryption algorithm into my iOS app, but when
I'm attempting to implement a simple Box Blur, but am having issues. Namely, instead
I'm attempting to implement the solution provided here , but apparently is conflicting with
I am attempting to implement global error handling in my MVC application. I have
I am attempting to implement some Facebook popups for my native FB app but
I'm attempting to implement BFS in Python, I understand how the algorithm works but

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.