Xcode 5 has a great new feature where you can hover over a variable name and get a visual representation of a UIColor, UIImage, or even UIBezierPath.
I vaguely reme
Now that 5.1 has been officially released I've released this new blog post on the matter.
To answer your question: Yes, this is indeed a feature available in the new release of XCode (v5.1) and can be used very easily by subclassing an object and returning whatever it is you want to see while debugging in a -(id)debugQuickLookObject
method.
This is a new feature in Xcode 5.1, and the documentation on it can be found here. In a nutshell, you override -(id)debugQuickLookObject
and return an OS type that already supports Quick Look, e.g. UIImage or NSAttributedString (full list of types in documentation):
- (id)debugQuickLookObject
{
UIImage *image = [...];
// Drawing code here
return image;
}
For Swift:
There are a few options as of writing, none ideal: