1

I am using webview to show videos. So when I launch the default site I am going to show YouTube. Here I used go back button also. When I launch the app the page is loading perfectly. Now my issues with app:

  1. I want to hide and unhide goback button based on pages I am navigating. (Here I am using webview delegate methods. For the first time those methods are executing. Next time onwards when I click on any video in the list I can able to go through the next page but these methods are not executing. Due to this reason when I reach main screen I can’t control on goback button visibility.)

    How can I control goback button hide/unhide feature?

  2. Is it possible to change title of webpage from YouTube to my videos on iOS?

    If we cannot change the title. Is it possible to move navigation bar along with webview. I am using navigation bar to cover the youtube page title bar.

Palec
  • 12,743
  • 8
  • 69
  • 138
user3341324
  • 45
  • 1
  • 9
  • If I understand the question correctly, you're looking to implement a back button in a tool bar for your web view similar to the linked [image](http://i.stack.imgur.com/wcDe6.png)? I quickly googled this image and I am not claiming it to be mine. – ajfigueroa Feb 23 '14 at 00:23
  • Alright, you might do well to look at the `enabled` property for UIBarButtonItems. I did something similar in a web view controller of mine a while back. Assuming your controller that is displaying the webview conforms to the UIWebViewDelegate protocol, in the `webViewDidFinishLoad:` method, I would update on each call the `enabled` property of my buttons by setting them to the `canGoBack` property that belongs to the UIWebView class. This was done as follows: `backButton.enabled = webView.canGoBack;`. There is also a `canGoForward` property that might prove helpful as well. – ajfigueroa Feb 23 '14 at 05:44
  • 1
    Hi thanks for your reply. But those delegate methods are executing only once not executes when i move from one page to another page. – user3341324 Feb 23 '14 at 05:50
  • I think I found a solution, take a look at [phopkins answer for a similar question](http://stackoverflow.com/questions/908367/uiwebview-how-to-identify-the-last-webviewdidfinishload-message). I learned something new! Let me know if this solves your problem. – ajfigueroa Feb 23 '14 at 06:01

0 Answers0