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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:27:14+00:00 2026-05-28T19:27:14+00:00

I have a UIView containing a UIScrollView . This UIView is supposed to respond

  • 0

I have a UIView containing a UIScrollView.
This UIView is supposed to respond to some touch events but it is not responding because of the scrollView it contains.

This scrollView’s contentView is set to a MoviePlayer inside the OuterView.
Now whenever I click in the area where the MoviePlayer is, touch events of my OuterView are not responding.

I have even set the movie player’s userInteraction to NO.

but now scrollView is interfering it seems.

I have referred to this post on SO itself.

How can a superview interecept a touch sequence before any of its subviews?

But the solution there, asks me to set the userInteractionEnabled to NO for the scrollView
But if I do so, my pinch zoom doesn’t take place either!

What to do?

  • 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-28T19:27:16+00:00Added an answer on May 28, 2026 at 7:27 pm

    An UIScrollView intercepts all touch events because it has to decide if/when the user has movd their finger in order to scroll the scroll view.
    You may want to subclass UIView, then in the

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)evt;
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)evt;
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)evt;
    

    methods, check for the neccessary touches, then forward all these methods to your UIScrollViewInstance. For example:

    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
    
    @interface MyView: UIView {
        UIScrollView *scrollView;
    }
    
    @end
    
    @implementation MyView
    
    /* don't forget to alloc init your ScrollView init -init
       and release it in -dealloc! Then add it as a subview of self. */
    
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)evt
    {
        /* check for a gesture */
        [scrollView touchesBegan:touches withEvent:evt];
    }
    
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)evt;
    {
        /* check for a gesture */
        [scrollView touchesMoved:touches withEvent:evt];
    }
    
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)evt;
    {
        /* check for a gesture */
        [scrollView touchesEnded:touches withEvent:evt];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIScrollView, inside it, a small UIView containing a UIPickerView. I'm able
I have a .xib file containing a UIView and 2 UILabel subviews linked to
I have a UINavigationController containing an UIViewController initialized with a UIView. The UINavigationController also
I have a UIView subclass ( CustomView for purposes of this question) that has
I have a UIScrollView which contains a sub-UIView, insetView which is used to display
I have a UIViewController , it's a view ( UIView ) containing two elements
I have some pretty standard flipping action going on: [UIView beginAnimations:@swapScreens context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
I have a uiview with a uiscrollview as a subview in a nib. Then,
I have an xib with a single UIView containing a bunch of images and
Suppose that i have UIView viewLoading declared in .h. and i do not directly

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.