I have a UIWebView
in which i load content from remote URL. Problem i am facing is, last part of the content of webview is not scrollable. When debugging i noticed that adjustedContentInset
is set as {0, 0, 49, 0}
. Perhaps that is the reason partial webview content(49 pts from end) is not scrollable. Is there any way i can get rid of adjustedContentInset
so that the whole content becomes scrollable?
I tried setting the contentInsets
of webview's scrollview to {0,0,0,0} but it didn't help.
UITableView
and UICollectionView
has contentInsetAdjustmentBehavior
method to reset adjustedContentInset
but i couldn't find such property for UIWebView
.
Any help will be appreciated.
Actually, contentInsetAdjustmentBehavior
is a UIScrollView
property, that's why what you mentioned:
UITableView
andUICollectionView
hascontentInsetAdjustmentBehavior
method to reset adjustedContentInset but i couldn't find such property forUIWebView
.
is correct.
That means contentInsetAdjustmentBehavior
is not a property for the UIWebView
(UIView
), what would you need to do is to access it via the web view scrollView
property:
The scroll view associated with the web view.
Discussion
Your app can access the scroll view if it wants to customize the scrolling behavior of the web view.
which exactly what are you aiming to. Therefore:
webView.scrollView.contentInsetAdjustmentBehavior = ...
should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With