Specific Web Page xCode

Discussion in 'Mac Programming' started by ForTheRisk, Jan 8, 2011.

  1. ForTheRisk macrumors newbie

    Joined:
    Jan 8, 2011
    #1
    Hi,

    i've created my first simple web browser :)D) and i want to open a specific web page ( for example only youtube ) and add a button who return to the main page ( if it's set to youtube then return to youtube.com )

    Who to dot that?

    Thank you.:rolleyes:
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Create an IBAction in your controller. Connect your button to the action. In the action use code like this:

    Code:
    [webView setMainFrameURL:@"youtube.com"];
    
    Assuming you're using a WebView and it's connected to a webView outlet in your controller.
     

Share This Page