• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detect Tap on Word in UILabel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect Tap on Word in UILabel?


  • Subject: Re: Detect Tap on Word in UILabel?
  • From: Roland King <email@hidden>
  • Date: Sun, 31 Jan 2010 10:39:32 +0800

no I don't think there is a way to do it directly.

your best solution if you want to do this is subclass UILabel, draw the actual label yourself and then use the knowledge of how you drew it to figure out the closest character to the touch, if you just make a simple subclass like that, you can probably get interface builder to instantiate your own version quite easily.

.. and Scott, the moderator, made it abundantly clear less than a week ago that discussion of unreleased software is *not allowed* on this list, so please just don't do it.

On 31-Jan-2010, at 7:54 AM, Samuel Ford wrote:

> Is it possible to detect which word was tapped in a UILabel in Cocoa Touch? It seems like it should be a pretty easy thing to do, but I'm stuck.
>
> Anybody ever try to do this?
>
> I know you can measure a string and get the bounding box that contains it; likewise, .. <redacted>
> _______________________________________________
>
> 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

_______________________________________________

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

References: 
 >Detect Tap on Word in UILabel? (From: Samuel Ford <email@hidden>)

  • Prev by Date: NSTextView Drag and Drop
  • Next by Date: Re: Node hierarchy with subclasses
  • Previous by thread: Detect Tap on Word in UILabel?
  • Next by thread: Re: Detect Tap on Word in UILabel?
  • Index(es):
    • Date
    • Thread