Disable scrolling in UIWebView - objective-c

In my iPad app, I am playing some PDF and Videos on UIWebView. I need to scroll pdf to read further pages. But at the same time the videos are also scrollable, which I want to disable. I am playing all these files on a single web view. I can write a condition to disable scrolling on a video and enable on a PDF. But I have no idea what to write inside the condition. Can anyone help me disabling scrolling of UIWebView.
Thanks
PC

You can disable scrolling of an entire UIWebView by:
webview.scrollView.scrollEnabled = NO;
As far as I know, it is not possible to disable scrolling for just one section of a UIWebView.

webView.userInteractionEnabled = NO;
Please note that this technic disables touches and interaction on the web view

Related

viewing documents in ios10 using qlpreviewcontroller or uidocumentinteractioncontroller

does anyone know how to get rid of the thumbnail preview on the right side of viewer in ios10 when using qlpreviewcontroller or uidocumentinteractioncontroller. covers part of document and seems to be permanent now. i would take either it swiping off the page, being able to possibly inset the right side of the document, or adding a button to show or hide. thanks for any help]1
No, this is not possible. The user can tap the document to go full-screen and hide the thumbnails view.

pinchable webview

I have a webview, which show a link to a specific website, but the display is fixed, it feels like browsing the web from old style mobile, n not iphone.
Is there a way to make a webview pinchable? Since the webview in my apps is not pinchable, which mean I can't zoom it in or out.
Any help is appreciated.
Thanx in advance.
You need to make sure that scale pages to fit is checked in IB, and that multi-touch & user interaction are enabled.
That worked for me:
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.bounds.frame];
webView.scalesPageToFit=TRUE;

how to stop uiwebview scrolling in iphone

I have a webview in my view. and i want to stop scrolling of that webview.
i am not getting how to stop the scrolling of the webview.
please give some good idea.
Thank You
set UserinteractionEnabled:No.
So that it cannot be scrolled

custom scrollbar in UIWebView iphone

My UIWebView has a huge data to display and the default scrollbar that comes with UIWebview takes lot of time to scroll.
Is it possible to implement a scrollbar on which user can tap and drag that were he wants.
Any hint in the right direction would be highly appreciated.
Waiting for your reply.
Thanks in advance
It depends on the type of the contents you are displaying in UIWebview.
Did you try make use of Javascript calls to scroll to certain ids within your html page?
Take a look at the wikipedia application or Wikipanion for iPhone for example... They have navigation screen so the user can jump to the section of their interest without the need to scroll the whole page.
hope that will help.

UIToolbar above UIWebView inside UIScrollView

I'd like to display a toolbar above a UIWebView but hide the toolbar until the person "pulls it down".
The same functionality can be seen in Safari on the iPhone. When the page loads, the toolbar containing the address is hidden. You must pull it down. In Safari it's possible to scroll up and eventually see the toolbar or scroll down through the page contents.
I've tried placing a UIToolbar and UIWebView inside a UIScrollView but it didn't work.
I've tried setting the UIScrollView to the size of the toolbar and webview combined, but that didn't work.
- (void)viewDidLoad{
CGSize size = CGSizeMake(webView.frame.size.width,
toolBar.frame.size.height + webView.frame.size.height);
[scrollView setContentSize:size];
}
How should I go about doing this?
EDIT
Anyone looking at this should consider that the question and accepted answer are both old and that the API might have changed to allow this.
The UIWebView is itself a UIScrollView so it's not going to work. I'm not sure how Apple does it, but one way to do it, if you have control over the content of the web view, is to write some HTML and CSS that replicates that address bar.