• 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
override behaviour of handling NSLinkAttributeName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

override behaviour of handling NSLinkAttributeName


  • Subject: override behaviour of handling NSLinkAttributeName
  • From: PCWiz <email@hidden>
  • Date: Mon, 2 Nov 2009 21:01:37 -0700

I'm making text clinks in an NSMutableString clickable through adding the NSLinkAttributeName attribute to any text that is a URL inside the string.

By default the clicked URL just opens in the default web browser. Is there any way to override this behaviour and have my own code run in place of just opening the URL.

The only workaround I see for this is creating a custom URL handler for my app, e.g. myapp:// and then add the NSLinkAttributeName attribute to it, and then when it opens the link my app will be called to handle it. But it would be nice if there was an easier way to do this.

Any suggestions are appreciated
thanks
_______________________________________________

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


  • Follow-Ups:
    • Re: override behaviour of handling NSLinkAttributeName
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Unable to disassemble objc_assign_strongCast
  • Next by Date: Re: override behaviour of handling NSLinkAttributeName
  • Previous by thread: Re: Unable to disassemble objc_assign_strongCast
  • Next by thread: Re: override behaviour of handling NSLinkAttributeName
  • Index(es):
    • Date
    • Thread