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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:20:26+00:00 2026-05-27T02:20:26+00:00

I want to trigger a UIPanGestureRecognizer attached to a UIView subclass when the initial

  • 0

I want to trigger a UIPanGestureRecognizer attached to a UIView subclass when the initial position of the touch is outside of the view (A below) of the UIView subclass. I have the following situation:

/-------------------/
| B                 |
|            /---/  |
|            | A |  |
|            /---/  |
|      C            |
|                   |
/-------------------/

A is the UIView that has the Pan gesture recognizer attached to it, B is the superview of A, and C is the initial position of the touch. The touch is then moved into A, and now I want A to take over the handling of the touch and the Pan recognizer to recognize the gesture and trigger its callback function.

As I understand B is returned by the initial hitTest:ing and thus will trigger the touchesBegan/Moved/Ended/Changed: handling of the touch.

How can I make the gesture recognizer of A “take over” the touch handling of this touch? Or at least receive the touches so that it may recognize the pan gesture?

My goal is to make this work when I track several touches at the same time in the situation when there are several subviews like A around, so that the touch may be “handed over” to anyone of these.

Any ideas on how to solve this would be greatly appreciated!

  • 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-27T02:20:26+00:00Added an answer on May 27, 2026 at 2:20 am

    This might not be as “clean” as what you are looking for, but the best way that I can think of to do what you want is to add the gesture recognizer to superview “B”, and then have “B” loop over its subviews to see when the gesture is inside a particular subview and then send messages to that subview to perform the desired action.

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

Sidebar

Related Questions

I want to trigger a hyperlink by hitting Enter using jQuery. I have the
I have a div, containing text and a few links. I want to trigger
I want to trigger a form submit, but not have my usual handlers for
I want to trigger the click, to which following code is listening: chrome.browserAction.onClicked.addListener(function(tab) {});
I have a process that runs continuesly. I want to trigger that process every
stackoverflow world! I have h:panelGrid, containing some elements. I want to trigger an action
i have an updatepanel in my asp.net web page. I want to trigger the
I have few builds defined in the TFS project and I want to trigger
I have a grid view that has a check box column, and I want
I want to trigger jQuery from a GMap info window. I have these code

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.