Xcode - Simple web browser URL issue

Discussion in 'Mac Programming' started by zmann, Nov 27, 2011.

  1. macrumors newbie

    Joined:
    Nov 27, 2011
    #1
    Hi,

    I'm building a simple web browser in Xcode and I'm wondering how I can get my URL bar to change when a user navigates to a new page. Currently, the URL bar will only display the URL of a page if it is typed into it.

    Any help would be appreciated!
     
  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Implement the WebFrameLoadDelegate method webView:didCommitLoadForFrame:.
     
  3. thread starter macrumors newbie

    Joined:
    Nov 27, 2011
    #3
    How do I do that? Sorry I'm kind of new to this...
     
  4. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Connect your controller (which will mostly likely be your app delegate) to the frameLoadDelegate outlet of your web view object in your .xib. Then add that method to your controller class.

    If that doesn't make any sense, follow the Your First Mac App tutorial and read Learning Objective-C.
     
  5. thread starter macrumors newbie

    Joined:
    Nov 27, 2011
    #5
    I finally got it working! Thanks for the help and links :)
     

Share This Page