views:

238

answers:

1

I created a sample in which i imported a word(.docx)on to the uiwebview and displayed.I got the output but i don't want to display the horizontal scroll bar and the vertical scroll also working not properly i can see the black space behind the webview when i scroll it vertically. Here is my code:

import

@interface userguideLinesNewViewController : UIViewController { IBOutlet UIWebView *webView; } @property (nonatomic,retain) UIWebView webView; -(void)loadDocument:(NSString)documentName inView:(UIWebView*)webViews; @end

import "userguideLinesNewViewController.h"

@implementation userguideLinesNewViewController @synthesize webView; -(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webViews {

NSString *path = [[NSBundle mainBundle] pathForResource:@"BTBP CLARITY SKIN ADVISORuser.docx" ofType:nil]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webViews loadRequest:request]; } - (void)viewDidLoad { [super viewDidLoad]; [self loadDocument:@"BTBP CLARITY SKIN ADVISORuser.docx" inView:self.webView]; }

A: 

You could check others topics about this : http://stackoverflow.com/questions/500761/stop-uiwebview-from-bouncing-vertically :-)

There isn't a method like in UIScrollView. But there is some kind of way to achieve your goal ;-)

Here is my way.

- (void)disableBounce {

    for (id subview in self.subviews)
        if ([[subview class] isSubclassOfClass: [UIScrollView class]])
            ((UIScrollView *)subview).bounces = NO;

}

Enjoy...

Vinzius