Disable WebView scrolling in Xamarin.Forms - webview

I want to display a page with an image on top and with a WebView containing HTML text.
The problem is that WebView has its own scrolling so when user scrolls WebView is scrolling while image stays in place.
Is is possible to disable WebView scrolling? So image and WebView would scroll simultaneously.
I know that one solution is to embed image into HTML, but are there other solutions?

Just set Webview.IsEnabled to false. It works when you don't have to interact with the Webpage.

We faced the same issue. The best way we've found of doing this is to create a custom renderer for the WebView. This page outlines what is required for iOS and Android, but is lacking in Windows. This worked for us, hope this helps.

Related

showing a pdf in uiwebview on ios9 sometimes scrolling is stuck

I'm working on an ios app written in swift, xcode7
A view has a UIWebView on it.
using loadRequest(NSURLRequest) we load a pdf file from disk.
This works fine, but sometimes the pdf file cannot be scrolled past the first page or what you see first on the screen. I can't pinpoint what causes the not-scrolling as sometimes I open the same file again and then it scrolls.
Trying to scroll when it doesn't want to bounces the bottom part of the screen and you can see there is another page, but you can't scroll it into view.
The UIScrollView contained inside the UIWebView (this is the default) knows there are more pages, because it shows "1 of 3" on screen.
The UIWebView
has 'scales page to fit' checked
has 'user interaction enabled' checked
has 'multiple touch' NOT checked
has 'autoresize subviews' checked
has mode 'Scale To Fill'
I have tried the following:
checking if the scrollview is not larger than the screen by placing a border around it: no, it fits on screen and is as large as you would expect
setting the internal UIScrollView.scollEnabled to true in code
In the application, when showing the UIWebview, it is resized on screen by collapsing an element above it, but I have tested this with fixed heights and it doesn't change anything.
When I call flashScrollIndicators() on the internal UIScrollView, this is consistent with the scrolling or non-scrolling. If you see the scrollbar flash, then scrolling is possible. If not, then you can't scroll past the first page.
Any other ideas I can try?
This sounds like a weird UIWebView problem.
Two additional things you can check :
Is the issue resolved after you rotate? (had this happen to me once)
If you call flashScrollIndicators on the internal UIScrollView and it's not responding. Is the internal UIScrollView a nil object?
Another solution is to try and use WKWebView. It might resolve the issue. Just be sure to only use it in the last versions of iOS.
You can also step down a layer and implement it with CoreGraphics since you have the PDF on the device itself and not on the web (official docs). There is probably a good CocoaPod or Carthage framework you can use for this.
The underlying problem was the fact that before loading a new pdf, the UIWebView was cleared each time by loading 'about:blank', which is the most suggested solution to clear the webview. However, when working with pdfs with different page sizes and different number of pages, this seems to mess with the built-in scrollview.
The solution in this case was to create a kind of 'blank' pdf with a single page (and maybe an application logo in it to distinguish it clearly for the user) and instead of loading about:blank, load this pdf instead before showing the webview to the user and while waiting for the real pdf to download to the device.

Iframe does not scroll on ios8 ipad

I need help making my web site iframe scroll on the ios8 ipad.
https://secure.gymnasticseast.com/4dcgi/1/class_manager.a4d?loc=bellevue
This shows an iframe the slides horizontally, but does not move at all vertically.
I've tried all of the combinations of css, inline styles suggested here to get it to work, but none have yet to scroll vertically on the iPad.
Please help!
Thanks!!
In my experience IFrames an Framesets don't work on Safari mobile, there are other solutions that do work depending on the problem.
Follow this link that confirms that.

Xcode WebView part of a page

I'm working on an iOS app and need to place a web view on a view controller...but I only need a certain portion of it to be shown (the title). Does anyone know how to do this? I would REALLY appreciate any help!
Just set the frame size (size where you want to display the title)required for the UIWebView.
Also you definitely can set the UIWebview to whatever size you wish to.

iOS zooms my webpage

This is frustrating and I have seen and tried many answers but still end up with a zoomed effect on my webpage when I view on iOS. I have experimented with various viewport settings but the initial view is always zoomed.
Here is the experimental link. The page has a fixed header and footer and looks and functions fine in web browsers but in iOS it looks zoomed in. If I double tap, it resumes the desired view.
http://jbrubaker.fatcow.com/dealer/index2.html
Viewport settings:
Is it a CSS issues?
A fixed element issue?
Thanks in advance.
Assuming that you are using UIWebView to view the site.
Set the BOOLEAN scalesPageToFit property of your UIWebView to YES.
This would hopefully solve your issue. If not then get back with your comments

ipad scrollbar in html5

I am very new to HTML5 development for ipad. I am creating my first application for ipad using HTML5. Everything is done except I am facing one problem. Problem description is.
There is one vertical overflowing div. This page is viewed properly in computer's browser but when the same page is viewed in ipad the overflowing section is cutoff and it appears that there is no overflowing content.
Please let me know the proper way of doing it.
On the iPad scrollable div's using overflow scrollbars will not appear on that div. The only way to scroll is using a two finger swipe.
Joe says that Scrollability is not yet ready to be used, so I wouldn't implement it in a production system.
To do this you have other options like:
http://cubiq.org/scrolling-div-on-iphone-ipod-touch
You want native-like scrolling on the iPad in your HTML5 application? You might want to check out a project called Scrollability by Joe Hewitt: http://joehewitt.github.com/scrollability/
Check out https://github.com/appmobi/aux_web (aUX_webScroll) . I'm the author, so if you have any questions, let me know.
iOS5 has the new property to allow scrolling on divs, but you'll find out that when you use it in a webview, the whole webview moves too and surprisingly, not everyone upgrades the OS.
I wrote an article about new features in iOS 5. Also this topic is covered on section -webkit-overflow-scrolling: http://samuli.hakoniemi.net/ios-5-and-new-features-for-web-developers/#webkit-overflow-scrolling

Resources