0

I am trying to clear the history of a webview using the code above:

[_webView setMaintainsBackForwardList:NO];

But I am geting this erro message:

"No visible @interface for uiwebview declares the selector setMaintainsBackForwardList"

What can I do?

Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235
Demetrio Guilardi
  • 325
  • 1
  • 5
  • 12

1 Answers1

0

The error message is pretty clear.

UIWebView has no such method, as you can easily confirm taking a look at the documentation.

setMaintainsBackForwardList: is a method of WebView, a OSX class which has a different implementation.

In order to erase the back/forward history in a UIWebView you can refer to this question (beware that the accepted answer is likely to have your app rejected, as per the comments)

Community
  • 1
  • 1
Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235