#import "WebView.h"
#import "SVProgressHUD.h"
@interface WebView ()<UIWebViewDelegate>
@end
@implementation WebView
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
UIWebView * webView = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds];
webView.delegate = self;
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlStr]]];
[self.view addSubview:webView];
}
-(void)webViewDidStartLoad:(UIWebView *)webView{
[SVProgressHUD showWithStatus:@"正在加载"];
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
[SVProgressHUD dismiss];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
网友评论