Skip to content

CKTextKitEntityAttributeName feature appears to be left incomplete #253

Closed

Description

@itsthejb

Hi all,

I'm currently trying to use CKTextComponent to attach a URL to a link as one might with NSLinkAttributeName. I saw CKTextKitEntityAttributeName, which appears to allow the attachment of an arbitrary object to a range in the string. So far so good, I can attach my NSURL here.

CKTextComponentViewControlTracker detects and creates a CKTextKitTextCheckingResult with my URL attached. However, the text checking result only appears to be used to track highlighting, and the actual -entityAttribute property is never accessed.

Therefore, this feature appears to be incomplete or disabled, so reporting if this if unexpected. It doesn't seem to be much work to use CKComponentActionSend() somewhere like -continueTrackingForTextComponentView:... in order to dispatch an event with my -entityAttribute. However, I'm afraid I'm unlikely to have the time. I would certainly be interested in getting some input on this, though.

Also, the need to set layer attribute with ck_setAllowsHighlightDrawing: on the highlightable component was very easy to miss, so could do with some documentation there 😬

Activity

  1. ocrickard commented on Jun 16, 2015

    @ocrickard
    Contributor

    Pull requests welcome, especially for documentation.

    However, this feature is implemented, and should be working. Please see #246

  2. itsthejb commented on Jun 16, 2015

    @itsthejb
    Author

    Ah, fantastic. Thanks for the speedy response. Now working as expected. Docs and helpers PRs under consideration for when I have a little breathing time! 😉

  3. ocrickard commented on Jun 16, 2015

    @ocrickard
    Contributor

    Awesome, Looking forward to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions