What you should do is you should create a UITapGestureRecognizer
on a UILabel
and when that UILabel
is tapped on, you should open the url.
Create the gesture like this:
UITapGestureRecognizer *gr =
[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(myAction:)];
[myLabel addGestureRecognizer:gr];
gr.numberOfTapsRequired = 1;
Next write this delegate
method when tap is pressed:
- (void) myAction: (UITapGestureRecognizer *) gr {
// write code to open the url here
[[UIApplication sharedApplication] openURL:url];
}