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
Prev Previous commit
Next Next commit
Force teh web view to display a blank page. This traditionally reduce…
…s the web view's ongoing memory use.
  • Loading branch information
adonoho committed Nov 8, 2014
commit aa2e514d752858947c38ac3f224418008196694b
16 changes: 12 additions & 4 deletions SVWebViewController/SVWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,17 @@ - (void) actionButtonClicked: (UIBarButtonItem *) sender {
} // -actionButtonClicked:


- (void)doneButtonClicked:(id)sender {
[self.webView stopLoading];
[self dismissViewControllerAnimated:YES completion:NULL];
}
- (void) doneButtonClicked: (id) sender {

[self.webView loadRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString: @"about:blank"]]];

dispatch_async(dispatch_get_main_queue(), ^{

[self dismissViewControllerAnimated:YES completion:NULL];
});

} // -doneButtonClicked:

@end