Gourav.J
Gourav.J

Reputation: 21

How to make UIWebView Blank when its already loaded once?

I am allocating and initializing the UIWebView in the viewDidLoad and I am loading the webview in the viewDidAppear.

So i want to clear the contents the UIWebView once its loaded by clicking a button.

Upvotes: 0

Views: 230

Answers (1)

San007
San007

Reputation: 762

   [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]];

Load the blank on button click.

Upvotes: 1

Related Questions