UIWebView goBack
- (void)goBack
UIWebView goBack example.
Sample code:
if ([webView canGoBack]) {
[webView goBack];
}
if ([webView canGoBack]) {
[webView goBack];
}
Example of [UIWebView goBack].
NSString *urlAddress = @"http://www.stackoverflow.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60];
[self.webview loadRequest:requestObj];
and then try your back navigation:
[self.webview goBack];
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60];
[self.webview loadRequest:requestObj];
and then try your back navigation:
[self.webview goBack];