搜索
您的当前位置:首页正文

iOS--webView加载本地错误html页面

来源:二三娱乐
- (void)viewDidLoad {
    [super viewDidLoad];
    CGRect bouds = [[UIScreen mainScreen] bounds];
    UIWebView *webView = [[UIWebView alloc] initWithFrame:bouds];
    NSURL *filePath = [[NSBundle mainBundle]  withExtension:nil];
    NSURLRequest *request = [NSURLRequest requestWithURL:filePath];
    [webView loadRequest:request];
    webView.delegate = self;
    webView.scrollView.bounces = NO;
    [self.view addSubview:webView];
}

截图

屏幕快照 2017-07-11 上午10.23.26.png
Top