Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nottooshabby

macrumors 6502
Original poster
Jul 12, 2008
416
90
So I know how to use openurl to make a button call a phone number or send an email, but is there a way to have a label that is a phone number be the button itself or be clickable? Do I need to make a custom invisible button behind the label that calls an ibaction function that contains the openurl command or is their a way to make the phone number look like a hyperlink so that the user would know they could click it to call the phone number? Hopefully this makes sense...
 

bbrosemer

macrumors 6502a
Jan 28, 2006
639
3
So I know how to use openurl to make a button call a phone number or send an email, but is there a way to have a label that is a phone number be the button itself or be clickable? Do I need to make a custom invisible button behind the label that calls an ibaction function that contains the openurl command or is their a way to make the phone number look like a hyperlink so that the user would know they could click it to call the phone number? Hopefully this makes sense...

I am pretty sure it has to be a button ...
 

drivefast

macrumors regular
Mar 13, 2008
128
0
you may have already found the answer by now, but if you didnt. you can either ( a ) use your label like you use an UIView to handle touch events: UILabel inherits from UIView, as an effect you have all the UIView methods available or ( b ) use a button of type "custom", set the "title" property to whatever you wanted the label to say, and use the font properties to adjust color and underlining.
 

nottooshabby

macrumors 6502
Original poster
Jul 12, 2008
416
90
you may have already found the answer by now, but if you didnt. you can either ( a ) use your label like you use an UIView to handle touch events: UILabel inherits from UIView, as an effect you have all the UIView methods available or ( b ) use a button of type "custom", set the "title" property to whatever you wanted the label to say, and use the font properties to adjust color and underlining.

Good call. I hadn't thought about (b). Thanks.... That should be easy enough.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.