I am loading a \"webpage1\" on an uiwebview and saving its first request on an instance variable \"webviewHistory\". Then, I must reuse that webview to load another page, \"webp
UIWebviews have instance methods that allow you to go backwards and forwards with the history, without you having to track the last request. Is there a particular reason you are saving the last request specifically?
Sample code:
if ([webView canGoBack]) {
[webView goBack];
}
Here is a project that is a simple uiwebview browser if you want to play with it: https://github.com/msencenb/UIWebView-Example
for swift 3 version of Msencenb answer:
if webView.canGoBack {
webView.goBack()
}