My question is this: in many free iPhone apps adds which are basically imageViews are buttons. When pressed, they bring you to the iphone App store to buy whichever app was advertised. Can this be tweaked to open a hyperlink in the iphone's safari browser? and if so, how?
A:
The App Store links are already simple hyperlinks, but the system notices that they point to the app store and opens the App Store app right away. The links are opened using the openURL:
method of the UIApplication
class:
NSURL *url = [NSURL URLWithString:@"http://www.stackoverflow.com/"];
[[UIApplication sharedApplication] openURL:url];
zoul
2010-06-12 06:12:05
so should I put this under an IBAction, and make the imageView a Button?
kevin Mendoza
2010-06-12 17:29:37
Yes, that sounds like a good solution.
zoul
2010-06-12 18:54:30