0

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 <UIKit/UIKit.h>

@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];
}
Nick T
  • 25,754
  • 12
  • 83
  • 121
iphoneStruggler
  • 21
  • 1
  • 2
  • 4

1 Answers1

2

You could check others topics about this : 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...

Community
  • 1
  • 1
Vinzius
  • 2,890
  • 2
  • 26
  • 27