Sebbie
Sebbie

Reputation: 91

uiwebview disable scrolling

I was wondering if someone could assist me in how to disable the scrolling function on UIWebView on Xcode.

I'll try explain my issue as best as possible.

I'm trying to disable the scrolling function so that the user cannot scroll up or down on the webview. Is there a way to somehow block the scrolling function?

If you need more information please let me know.

Many thanks.

Upvotes: 2

Views: 6638

Answers (2)

Ridho Octanio
Ridho Octanio

Reputation: 1

write this inside ur viewDidLoad if you not use CollectionView / TableView

webView.scrollView.scrollEnabled = false
webView.scrollView.bounces = false

if you use CollectionView / TableView

you can write on awakeFromNib

Upvotes: 0

DHEERAJ
DHEERAJ

Reputation: 1468

To disable scroll view in UIWebview,Wirte this inside ur viewDidLoad

webView.scrollView.scrollEnabled = NO;
webView.scrollView.bounces = NO;

also

webview.scalesPageToFit = TRUE;

Upvotes: 10

Related Questions