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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:49:58+00:00 2026-06-09T23:49:58+00:00

Note: I already read some questions about the UIScrollView sending touches to the subviews

  • 0

Note: I already read some questions about the UIScrollView sending touches to the subviews (this included and although I have up voted, it’s not working as I intended anymore).

What I have: I have a UIScrollView with a Custom UIView (let’s call it A) inside which covers the entire UIScrollView. I am also allowed to put other custom UIViews inside the A.

On the code I am doing this:

[scrollView setDelaysContentTouches:YES];
scrollView.canCancelContentTouches = NO;

What is happening: At the moment my only issue is that, if I want to move a subview inside A, I have to touch it, wait, and then move it. Exactly as stated here:

Now, the behaviour changes depending on the “length in time” of the
first touch on the UIView. If it’s short, then the relative dragging
is managed as it was a scroll for the UIScrollView. If it’s long, then
I’m getting the touchesMoved: events inside my UIView.

What I want: The subviews inside A should always receive priority and I shouldn’t have to touch and wait. If I touch A and not a subview of it, I want the UIScrollView to receive the touches, like panning and moving around (the contentSize is bigger than the frame).


Edit 1.0

The only reason for me to have this A view inside a generic UIScrollView, is because I want to be able to zoom in/out on the A view. So I am doing the following:

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
    return customView; // this is the A view
}

In the beginning I didn’t had the A view inside the UIScrollView and the only thing I did was adding the A as a subView of my UIViewController's root view and everything went well. If there is another way to enable zoom in/out I will gladly accept the answer.

  • 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-09T23:50:00+00:00Added an answer on June 9, 2026 at 11:50 pm

    Note: Thank you all for your contributions, specially to Aaron Hayman.

    I was able to figure it out by doing the following on the UIScrollView sub-class I had:

    -(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
    {
       CGPoint pointOfContact = [gestureRecognizer locationInView:self];
    
        // The view with a tag of 200 is my A view.
        return (![[self hitTest:pointOfContact withEvent:nil] isEqual:[self viewWithTag:200]]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I've already read this topic , but I don't understand it and it
Note: This is a sequel to my previous question about powersets. I have got
Note: I already saw this and it doesn't answer the question. I have a
[Please note that this is a different question from the already answered How to
(Note: This is not a question about what is the best way with code
NOTE: This is a followup to my question here. I have a program that
I've already read those questions but none of them answer to my need: Testing
NOTE: As per ECMAScript5.1, section 15.1.1.3 , window.undefined is read-only. Modern browsers implement this
Having already read this question I haven't managed to figure out what the problem
Similar questions: Some characters in CSV file are not read during PHP fgetcsv() ,

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.