Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix UI bug on iOS 7 iPhone
  • Loading branch information
Jason Hsu committed Jan 15, 2014
commit f83b2e4e0fa325692fa807675e091e6c36a92cfe
6 changes: 5 additions & 1 deletion SVWebViewController/SVWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (id)initWithURL:(NSURL*)pageURL {
}

- (void)loadURL:(NSURL *)pageURL {
[self.webView loadRequest:[NSURLRequest requestWithURL:pageURL]];
[self.webView loadHTMLString:@"<html><body></body></html>" baseURL:nil];
}

#pragma mark - View lifecycle
Expand Down Expand Up @@ -232,6 +232,10 @@ - (void)webViewDidStartLoad:(UIWebView *)webView {

- (void)webViewDidFinishLoad:(UIWebView *)webView {
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
if ([webView.request.URL.absoluteString isEqualToString:@"about:blank"]) {
[self.webView loadRequest:[NSURLRequest requestWithURL:self.URL]];
return;
}

self.navigationItem.title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];
[self updateToolbarItems];
Expand Down