I am setting uiWebviewSocial as desired on IB and is loading requests as normal. However, later I need also to init this uiwebview in order to clear goBack history. I am using a
The problem is that after you are init'ing the new webviewBridge or webviewSocial, you are immediately overwriting the new object with the assignment on the next line. Remove the third line in each method.
Well, I've been going aroundUIWebView
in Stack Overflow these days and is a mess, for me at least.
It seemsUIWebView
cache works at its own, I mean we cannot change neither access some info that is exclusively managed by system...
About your problem, it seems although yourUIWebView
is sent to nil, it keeps getting info from cache... so, you should clear cache firstable
You can check it here and there
If I am not misunderstanding, when you load the view you get an "initial" webviewSocial (with history and contents??), then after some loadings you make in the UIWebView, these are stored as history in webviewBridge, isn't it? When you send webviewSocial to nil, that shall be empty... but NOT webviewBridge... and then if you are reloading webviewSocial with webviewBridge (which in fact is previous whole history), that's why it happens... I think
Saludos