• 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: Getting a tooltip to describe your class instance.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a tooltip to describe your class instance.


  • Subject: Re: Getting a tooltip to describe your class instance.
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 26 Aug 2015 17:27:49 -0700


On Aug 26, 2015, at 3:39 PM, Sean McBride <email@hidden> wrote:

By adding doxygen comments, if I understand your question...

No, Alex is talking about a debug-time tooltip, the one that shows up if you hover over the name of an active variable while stopped at a breakpoint. There’s a way to customize what’s displayed by implementing a specific method.

I couldn’t remember the details either, but I remembered it’s called QuickLook, so I googled [xcode quicklook] and this was the top hit:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/Introduction/Introduction.html

tl;dr: The method you add to your class is -debugQuickLookObject. The return type is ‘id’ — there’s a whole bunch of different classes you can return, like NSString, NSAttributedString, NSImage, NSColor, NSBezierPath. The object you return gets rendered in the tooltip.

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting a tooltip to describe your class instance. (From: Alex Zavatone <email@hidden>)
 >Re: Getting a tooltip to describe your class instance. (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: Getting a tooltip to describe your class instance.
  • Next by Date: Auto Layout Problems
  • Previous by thread: Re: Getting a tooltip to describe your class instance.
  • Next by thread: Auto Layout Problems
  • Index(es):
    • Date
    • Thread