press button to open web page from app
Posted
by
Lee
on Stack Overflow
See other posts from Stack Overflow
or by Lee
Published on 2009-08-06T17:40:22Z
Indexed on
2012/09/25
15:38 UTC
Read the original article
Hit count: 247
I have an app that I want to interact with a web page. Basically I want to press a button and the web page will open in a new view...
Sorry I wasn't clear, I am developing on a Mac for an iPhone. Currently I have a "locate me" app that displays your Latitude and Longitude. I want to use those variables to populate 2 of the blanks on a PHP web page/form I have developed.
I have added a label and button to my current app, when the button is pressed the URL with the Lat and Long (as passed vars) are displayed in the label. I want those vars to appear on my web page. Hope this is clearer...
Solved: I just added these lines of code I found here:
NSURL *url = [ [ NSURL alloc ] initWithString: @"http://www.cnn.com" ];
[[UIApplication sharedApplication] openURL:url];
© Stack Overflow or respective owner