Hi does anybody know how I can programatically scroll a UIWebView in Objective-C (iPhone SDK)?
The only solution I can think of is to put it inside a UIScrollView and programatically scroll that, however this presents the problem that the web view is often the wrong size and therefore the bottom of the page is cut off when scrolling. I have no idea how to programatically change the size of a web view to fit its content either... so far I have:
UIView *webDocView = webView.subviews.lastObject; webView.frame = CGRectMake(webView.frame.origin.x, webView.frame.origin.y, webView.frame.size.width, webDocView.frame.size.height);
But for some reason this will not work
Should I persue the solution of using a ScrollView... or is there a better way to do this?
Sorry if this is presented confusingly - I'm relatively new to Objective-C
Any help is greatly appreciated :)