Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

steveclv

macrumors newbie
Original poster
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
 
I have a difficult time finding information in their docs as well. I'm really hoping this gets better by June.
 
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

Check out the launch me sample....

[[UIApplication sharedApplication] openURL:[NSURL URLWithString😡"http://www.apple.com"]];
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.