---
title: "In WebView disabling UIToolBar's Back and Forward butttons:"  
description: "In WebView disabling UIToolBar's Back and Forward butttons:"  
author: "Anonymous User"  
published: 2015-10-02  
updated: 2015-10-04  
canonical: https://www.mindstick.com/forum/33488/in-webview-disabling-uitoolbar-s-back-and-forward-butttons  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# In WebView disabling UIToolBar's Back and Forward butttons:

I was creating a [web browser](https://www.mindstick.com/blog/301688/best-web-browsers-for-2023) using UIWebView [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) in iPhone, whenever I run the browser it successfully running but my [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is with its back and [forward](https://www.mindstick.com/forum/159810/what-happens-during-a-roll-forward-process) buttons that are always enable whether the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page) [history](https://yourviews.mindstick.com/view/81373/indian-railways-create-history-with-it-s-shramik-special-trains) 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](https://www.mindstick.com/articles/12101/interfaces-in-java-extending-interfaces) builder.\
I am new in iPhone, so any one who know how to solve that problem help me...

## Replies

### Reply by Tarun Kumar

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]];}
```


---

Original Source: https://www.mindstick.com/forum/33488/in-webview-disabling-uitoolbar-s-back-and-forward-butttons

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
