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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:04:39+00:00 2026-06-09T09:04:39+00:00

I have transparent UIView (we’ll call it receiver ) layered over a UIScrollView (

  • 0

I have transparent UIView (we’ll call it receiver) layered over a UIScrollView (scrollView) which has a UIScrollViewDelegate (scrollViewDelegate).

In some situations, receiver needs to consume the touch events which land on it. In others, I need to glean some positional information and then either pass the touch events intact through to scrollView or alternatively spoof the events which would comprise a drag movement and result in the appropriate deceleration etc. How can I achieve this?


EDIT – Research thus far:

I’ve put a breakpoint inside scrollViewDelegate‘s scrollViewWillBeginDragging, which reveals the call sequence to be:

(...various calls filtering down from UIApplicationMain...)
[UIWindow sendEvent:]
[UIWindow _sendGesturesForEvent:]
...
[UIGestureRecognizer _delayedUpdateGesture:]
[UIGestureRecognizer _updateGestureWithEvent]
_UIGestureRecognizerSendActions
[UIScrollView handlePan:]
[UIScrollView _updatePanGesture]
....
[UIScrollViewDelegate scrollViewWillBeginDragging:]

Ideally, I’d like to be able to call into UIScrollView handlePan: with the appropriate information, but I can’t find anything which details how to correctly call handlePan (I assume it must be possible, since _UIGestureRecognizerSendActions does it?).

Alternatively I suppose I could subclass UIGestureRecognizer, but this seems a pretty heavy handed way of doing it (and again I have no idea how to communicate the sequence of touch events).

  • 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-09T09:04:40+00:00Added an answer on June 9, 2026 at 9:04 am

    The easiest way to do this is to place your UIScrollView inside of your receiver.

    You can then do one of two things:

    • Set userInteractionsEnabled on your scroll view to NO if you know ahead-of-time that the events shouldn’t be delivered to it. The events will be delivered to your receiver view instead.

    • Override hitTest:withEvent: to note the incoming events. To squelch them, just return your receiver (indicating that it should be the target of those events); to pass them along, return the value from super’s implementation (which will correctly identify the scroll view as the target when appropriate).

    If you really need to synthesize events, you can construct them and pass them to UIApplication‘s - (void)sendEvent: method. (Calling handlePan: directly probably won’t work, since it takes a UIGestureRecognizer and so will be hard to fake.)

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

Sidebar

Related Questions

I have a UIView has some labels and buttons on it. Next I also
I have multiple transparent BufferedImage instances which I'd like to layer on top of
I'm trying to have a single large UIView (for example a web view) which
I have a UIViewController Class which holds 2 custom UIView classes which are: ItemView
I have a UIView with an alpha of 0.5 which I add as a
in my application I use have the following views hierarchy: UIView ----UIScrollView --------TiledView (UIView
I have a UIView with a UITableView for a subview. The UIView has an
I have a UIView to which i add a background image. Then to that
Have a view which I want to make transparent, it works on the simulator,
Is it possible to have transparent background image using CSS3? background: url(../img/bg_paperlines.jpg) repeat-x; Using

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.