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

steveclv

macrumors newbie
Original poster
Mar 31, 2008
4
0
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
 

iphoneGuy

macrumors member
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:mad:"http://www.apple.com"]];
 

ElNono

macrumors newbie
Apr 1, 2008
3
0
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.