Re: Clickable UILabel - iPhone
Re: Clickable UILabel - iPhone
- Subject: Re: Clickable UILabel - iPhone
- From: Henry McGilton <email@hidden>
- Date: Wed, 10 Mar 2010 15:30:13 -0800
On Mar 9, 2010, at 9:25 PM, Sasikumar JP wrote:
> Hi,
> I am new to the Cocoa Programming. I am working on my first iPhone app. I want to present the data in tableview, there user can click the url or user name in the text.
>
> I have customized the table view cell and displayed the text in UILabel. Not sure how to enable the clickable link for the required string( like userName and url).
>
> Eg:
> Hello "John", You can download the app from "http://www.apple.com"
>
> => I want to enable the clickable link for quoted string
>
> I have tried with UITextView. But it enables the link only for URL and Phone Number. I dont know how to enable the link for userName in the text.
>
> I have seen this feature in some of the twitter client(Twitterriffic,Echofon), not sure how to implement this.
>
> Your help is highly appreciated
A UILabel is a sub-class of UIView. But its userInteractionEnabled property is NO by default.
So just do [myLabel setUserInteractionEnabled: YES];
Cheers,
. . . . . . . . Henry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden