Reputation: 68
hi i want to move to next page of html file on next button click and previous button click.
NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"opening" ofType:@"html"];
NSData *htmlData = [NSData dataWithContentsOfFile:htmlPath];
NSString *htmlString = [[NSString alloc] initWithData:htmlData encoding:NSUTF8StringEncoding];
[self.webView loadHTMLString:htmlString baseURL:[[NSBundle mainBundle] bundleURL]];
Upvotes: 1
Views: 212
Reputation: 12719
To go Forward
, Backward
you just need to call these default UIWebview
methods
-(IBAction)goBackAction{
if(self.webView.canGoBack){
[self.webView goBack];
}
}
-(IBAction)goForwardAction{
if(self.webView.canGoForward){
[self.webView goForward];
}
}
Hope this helps.
Upvotes: 2