1

I am using uiwebview in my code and implemented swipe function on uiwebview. For swipe function i have set YES for scaleToFir property for webview, when we give, scaleToFit=YES, content get shrinked. But for my case both needed. swipe aswell as content should not shrink. But disable horizontal bar is fine. can you please help me out?

Srini

sri
  • 3,319
  • 7
  • 34
  • 48
  • Looks like a duplicate of [How to disable UIWebview horizontal scrolling?](http://stackoverflow.com/questions/2397699/how-to-disable-uiwebview-horizontal-scrolling) and [how to disable horizontal scroll for a uiwebview?](http://stackoverflow.com/questions/3758678/how-to-disable-horizontal-scroll-for-a-uiwebview). – EdoDodo Nov 25 '10 at 14:18

2 Answers2

0

Try This:

- (void)webViewDidFinishLoad:(UIWebView *)webView {
NSLog(@"loaded");
[webView.scrollView setContentSize: CGSizeMake(webView.frame.size.width, webView.scrollView.contentSize.height)];
}
smottt
  • 3,272
  • 11
  • 37
  • 44
0
for (UIScrollView *scroll in [webview subviews]) {
    // Make sure it really is a scroll view and reset the zoom scale.
    if ([scroll respondsToSelector:@selector(setZoomScale:)]){
        scroll.bounces=FALSE;
    }
}
fannheyward
  • 18,599
  • 12
  • 71
  • 109
PlusInfosys
  • 3,416
  • 1
  • 19
  • 33