我创建了一个示例,其中我将一个单词(.docx)导入到 uiwebview 并显示。我得到了输出,但我不想显示水平滚动条并且垂直滚动也不能正常工作我可以看到黑色当我垂直滚动时,webview 后面的空间。这是我的代码:
#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];
}