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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:47:23+00:00 2026-06-11T20:47:23+00:00

My UIWebView should not allow vertical scrolling. However, horizontal scrolling should possible. I have

  • 0

My UIWebView should not allow vertical scrolling. However, horizontal scrolling should possible.

I have been looking through the documentation, but couldn’t find any hints.

The following code disables both scrolling directions, but I want to only disable vertical:

myWebView.scrollView.scrollEnabled = NO;

How do I solve this problem?

  • 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-11T20:47:25+00:00Added an answer on June 11, 2026 at 8:47 pm

    Enable Horizontal scrolling and disable Vertical scrolling:

    myWebView.scrollView.delegate = self;
    [myWebView.scrollView setShowsVerticalScrollIndicator:NO];
    
    -(void)scrollViewDidScroll:(UIScrollView *)scrollView
    {
        if (scrollView.contentOffset.y > 0  ||  scrollView.contentOffset.y < 0 )
            scrollView.contentOffset = CGPointMake(scrollView.contentOffset.x, 0);
    }
    

    the 2nd line there will hide the vertical scroll indicator. Checking if “scrollView.contentOffset.y < zero” will disable the bouncing when you attempt to scroll downwards. You can also do: scrollView.bounces=NO to do the same thing!!
    By just looking at Rama Rao’s answer i can tell that his code will reset the scrollView to (0.0) the moment you try to scroll vertically, thereby moving you away from your horizontal position, which is not good.

    Enable vertical scrolling and disable Horizontal scrolling:

    myWebView.scrollView.delegate = self;
    [myWebview.scrollView setShowsHorizontalScrollIndicator:NO];
    
    -(void)scrollViewDidScroll:(UIScrollView *)scrollView
    {
        if (scrollView.contentOffset.x > 0)
            scrollView.contentOffset = CGPointMake(0, scrollView.contentOffset.y);
    }
    

    PEACE

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

Sidebar

Related Questions

I have some HTML in my UIWebView controller, but I can not seem to
I got a UIWebView in my project with DSBezelActivityView but it seems to have
Till now, I have been using google charts and UIWebView to show graphs in
I'm writing an iPhone app with a UIWebView which should display various html files
LoadHtmlString UIWebView is not working. I want to play embeded you tube video. I
I have problem with UIWebView delay when the load image from url. In my
I have a UIWebView in my iPhone app that have a web page with
I am using UIWebView to display web pages in my application. but when hyperlink
I have implemented UIWebView and displaying the contents coming from web services,Here is the
In order to switch between views in my iOS app, I have been 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.