views:

274

answers:

2

Outside of a UIWebView, how can I make a phone number clickable that is in say a UILabel or UIButton?

+2  A: 

Hi, 4th

you can use this code to enable call from your application.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://0123456789"]];

enjoy buddy...

Accept the answer if you satisfy...

yakub_moriss
Thanks. If your text is in the title of a navigation bar or prompt of the navigation bar, how can it be made click able?
4thSpace
Hi, 4th take one UIView and take a UIButton inside the UIViewand set that UIView as a titleView of the UINavigationBar.and put the call event on that button event...i think you understand what i am trying to say...
yakub_moriss
A: 

make a UIButton of custom type and as Caption set a number to display... so it will display only one number (button won't be visible...) and on button's click event Call that particular number by

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://1456987452"]];
mihirpmehta