开发者

How to create clickable phone number

Outside of a UIWebView, how can I make a phone number clickable that is in 开发者_如何学JAVAsay a UILabel or UIButton?


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

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


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"]];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜