iPhone SDK - create a button with URL to open Safari

Discussion in 'Mac Programming' started by steveclv, Mar 31, 2008.

  1. macrumors newbie

    Joined:
    Mar 31, 2008
    #1
    I'm wading through gigabytes of SDK docs but I can't see an example of how to assign a URL held in a variable to a button so that when the user presses it, Safari opens the web page.

    Must be so simple that Apple didn't think we needed an example but I'm afraid I can't see how to do it with this new version of C.

    Thanks for any help
     
  2. macrumors 6502

    Monkaaay

    Joined:
    Jun 19, 2006
    Location:
    Richmond, VA
    #2
    I have a difficult time finding information in their docs as well. I'm really hoping this gets better by June.
     
  3. macrumors member

    Joined:
    Mar 31, 2008
    #3
    a good thing for them to do would be to include all inherited methods/properties in the class documentation.
     
  4. macrumors member

    Joined:
    Oct 26, 2007
    Location:
    [[NSLocation alloc] initWithCity: Chicago]
    #4
    Check out the launch me sample....

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mad:"http://www.apple.com"]];
     
  5. macrumors newbie

    Joined:
    Apr 1, 2008
    #5
    Two helpful tidbits about documentation and contextual help.
    1) Customize your toolbar and add the 'Research Assistant' icon. Click on it and it will open a window that, as you type or select items, will contextually give you information of what you're doing, including links to the built in documentation for that topic.
    2) Enable code auto completion in the preferences for XCode.
     

Share This Page