Reputation: 21
I'm preparing a project in which I want to connect to an URL on clicking a button. I have prepared the database side, even TCP program prototype is ready in my mind but I cant open a page by clicking a button. Can you please help?
Upvotes: 2
Views: 1031
Reputation: 113400
Open a page, how?
If you want the page to open in Safari, you can do this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://stackoverflow.com/"]];
If you want to open the page in an embedded browser in your app, you can use UIWebView
.
If you only want to open an HTTP connection, take a look at NSURLConnection
.
Upvotes: 4