Reputation: 21
Is it possible to send an url via image by clicking the image, then opening the browser, for an app on the iPhone?
I'm using Xcode 4.4
Thanks.
Upvotes: 0
Views: 81
Reputation: 330
Yes, it's possible.
1st A) add a gestureRecognizer to the UIView and use the following two lines of code...
1st B) or use instead a Button with BackGround Image and use the following two lines of code...
NSURL *url = [NSURL URLWithString:@"http://www.stackoverflow.com"];
[[UIApplication sharedApplication] openURL:url];
Any further questions?
Upvotes: 1