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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:40:28+00:00 2026-05-31T03:40:28+00:00

I have table view with button. I have added UIPanGestureRecognizer to button to allow

  • 0

I have table view with button. I have added UIPanGestureRecognizer to button to allow user to move button horizontally. But then vertical scroll of whole table view does not work now when user touches the button. If I don’t use gesturerecognizer, vertical scroll works ok. How to allow users to move button horizontally and table view vertically?

  • 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-31T03:40:30+00:00Added an answer on May 31, 2026 at 3:40 am

    When you intercept the gesture recoginition, you are blocking the UITableView to get notified about the gesture event. To deal with this, in the same place (method) that you recognize a gesture, do a comparison. If it is a horizontal gensture (e.g. horizontal pan), do whatever you want to do, otherwise, pass it along the chain, so that the table view gets a chance to respond to it.

    EDIT

    It depends what methods you have, and what methods you have overriden. Once you recognized the touch event. Here is an example:

    -(void)respondToEvent:(UIEvent *)event {
           if (event == horizontalPan)
              [self handleEvent:event];
           else
              [super respondToEvent:event];
    }
    

    You should call the same method on the next responder (or super).

    References:

    1. https://developer.apple.com/library/ios/#DOCUMENTATION/EventHandling/Conceptual/EventHandlingiPhoneOS/EventsiPhoneOS/EventsiPhoneOS.html#//apple_ref/doc/uid/TP40009541-CH2-SW5

    2. https://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder

    3. http://books.google.com/books?id=rk1EEL4WpFEC&lpg=PP1&pg=PA530#v=onepage&q&f=false

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

Sidebar

Related Questions

I have added button to datagrid view but when ever the function is called
Here's my case: I have a table view showing contacts. Add button in the
I have a table view controller with custom cells. In those cells i added
I have a table view controller which doesn't let me manually scroll to the
I have Grouped Table View in which I want to display Contact details. But
In my app I have a table view where the user presses an add
Currently, I have a table view that the user can add items and delete
I have added a UIButton in a table view. Now when I click a
EXACT duplicate of Datagrid View Button repeat I have added button to datagrid view
I have stumbled upon a problem when adding a button to my table view

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.