iPhone SDK - create a button with URL to open Safari

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

  1. steveclv macrumors newbie

    Mar 31, 2008
    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. Monkaaay macrumors 6502


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

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

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

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

    Apr 1, 2008
    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