In WebView disabling UIToolBar's Back and Forward butttons:

Total Post:16

 875  View(s)
Rate this:
I was creating a web browser using UIWebView control in iPhone, whenever I run the browser it successfully running but my problem is with its back and forward buttons that are always enable whether the page history available or not.
So I want to enable them when the page history available for back and forward buttons, in my app, I am using toolbar at the bottm side in Interface builder.
I am new in iPhone, so any one who know how to solve that problem help me...
  1. Post:214

    Re: In WebView disabling UIToolBar's Back and Forward butttons:

    Here I provide you some code, these codes will execute whenever the user loads a page. But at first implement the UIWebViewDelegate and its method webViewDidFinishLoad:

    -(void)webViewDidFinishLoad:(UIWebView *)webView
      // Enable or disable back
      [myBackButton setEnabled:[myWebView canGoBack]];
      // Enable or disable forward
      [myForwardButton setEnabled:[myWebView canGoForward]];



Enter your email address here always to be updated. We promise not to spam!