开发者

Detect a url in a UITableViewCell

I'm developing an iPhone app where I take the twitter feeds to a table view.currently I'm inserting a label as a sub view to the table cell to display multiple details.What I want to do is to detect urls inside that label where when we touch the urls,it should open up in safari.How can I do that?.....Hope you开发者_如何学编程 guys will help me.

Thanks.


It's not straightforward to do with just what's provided in the iPhone SDK.

Fortunately, the Three20 library has a TTStyledTextLabel that supports exactly what you want.

Here is a screenshot (using TTStyledTextTableItemCell which is a table cell with a TTStyledTextLabel):

Detect a url in a UITableViewCell

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜