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

  • Home
  • SEARCH
  • 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 7774317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:20:50+00:00 2026-06-01T17:20:50+00:00

I have a UIScrollView with paging enabled like the following: container = [[UIScrollView alloc]

  • 0

I have a UIScrollView with paging enabled like the following:

container = [[UIScrollView alloc] initWithFrame:kScrollViewFrame];
[container setDelegate:self];
[container setShowsHorizontalScrollIndicator:YES];
[container setShowsVerticalScrollIndicator:NO];
[container setClipsToBounds:YES];
[container setPagingEnabled:YES];
[container setDecelerationRate:UIScrollViewDecelerationRateFast];
[container setBounces:NO];
[container setUserInteractionEnabled:NO];
[container setCanCancelContentTouches:NO];
[container setDelaysContentTouches:NO];

To the UIScrollView, I add several UIWebViews, and set their interaction enabled to yes like so.

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code

        self.frame = frame;
        self.userInteractionEnabled = YES;
    }
    return self;
}

which breaks paging and all touches on the UIScrollView. If I set user interaction enabled to NO, page works, but I can’t highlight text in the UIWebView. I tried subclassing UIScrollView like the following, but the same circumstances occur. Any idea?

- (id)initWithFrame:(CGRect)frame
{
    NSLog(@"init");
    return [super initWithFrame:frame];
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"touchesBegan");

    [[self nextResponder] touchesBegan:touches withEvent:event];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"touchesMoved");

    [[self nextResponder] touchesMoved:touches withEvent:event];
}

- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"touchesEnded");
    [[self nextResponder] touchesEnded:touches withEvent:event];
}
  • 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-01T17:20:51+00:00Added an answer on June 1, 2026 at 5:20 pm

    Disabling user interaction on the container effectively disables it on the subviews as well. You should enable it, causing the touch event to propagate down the view hierarchy;

    [container setUserInteractionEnabled:YES];
    

    If you want to disable scrolling on the UIWebView just get inside its UIScrollView

    yourWebView.scrollView.scrollEnabled = NO;
    

    I’ve tested this on my device and I can both “page through” the UIScrollView and select text on UIWebView.

    EDIT:

    I got this working! You have to allow touch canceling as well:

    [container setCanCancelContentTouches:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIScrollview with paging enabled. There are 3 views (pages) inside this
I have a UIScrollView with paging enabled, and that works fine. Now I want
I have a UIScrollView that contains a UIView inside. The UIScrollView has paging enabled
I have a UIScrollView with paging enabled. Each page is of width 768.0px in
I have a UIScrollView 's paging enabled and set its clipToBounds = NO so
I have a UIScrollView with paging enabled. After I change the view from landscape
I need to display 10 - 1000 images on a UIScrollView. Paging is enabled.
I have a scrollView with paging enabled and a number N of pages, which
I have a UIScrollView with pagingEnabled on and I want to (using like a
i want to implement a UIScrollView where paging is enabled and i can just

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.