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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:15:21+00:00 2026-05-16T14:15:21+00:00

I have a scroll view that used to scroll when it didn’t have buttons

  • 0

I have a scroll view that used to scroll when it didn’t have buttons all over it. Now it does, and when dragging the mouse (on simulator) nothing happens (i think because the buttons are being pushed). How can I make this right?

  • 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-16T14:15:22+00:00Added an answer on May 16, 2026 at 2:15 pm

    This is happening because UIButton subviews of the UIScrollView (I assume buttons are added as subviews in your case) are tracking the touches and not the scroll view. UIScrollView method touchesShouldCancelInContentView is the key here. According to its description: “The default returned value is YES if view is not a UIControl object; otherwise, it returns NO.”, i.e. for UIControl objects (buttons), UIScrollView does not attempt to cancel touches which prevents scrolling.

    So, to allow scrolling with buttons:

    1. Make sure UIScrollView property canCancelContentTouches is set to YES.
    2. Subclass UIScrollView and override touchesShouldCancelInContentView to return YES when content view object is a UIButton, like this:
    - (BOOL)touchesShouldCancelInContentView:(UIView *)view
    {
        if ( [view isKindOfClass:[UIButton class]] ) {
            return YES;
        }
    
        return [super touchesShouldCancelInContentView:view];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSScroller that is used to scroll some complete custom view of
I have a scroll view with transparent background that covers most of the screen.
I have UIScrollView in my view. Problem is that if I slightly scroll it
I have an scroll view with some sophisticated animations happening during scrolling. Although after
Suppose I have a scroll view in a view & a scroll view's size
I have a GTK# Text View with word wrap and scroll bars turned on.
I have a table view controller which doesn't let me manually scroll to the
Does anyone know or have good links that explain what iPhone's event loop does
I'm working on a split view application that is used to view PDF files
I am trying to create a options button above my scroll view that will

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.