If you like my tutorials, you will love my book . It is chockful of advanced programming techniques and the only comprehensive barcode reference for serious iOS developers.
Our DNA is written in Objective-C

Radar: Support Multiple Shadows in NSHTMLWriter

That was an easy Radar for me to file. It’s not a bug, but it is bugging me nevertheless.

I am disturbed by the disparity between the NSShadowAttributeName attribute (which can only hold a single NSShadow) and CSS where you can have multiple shadows. Because NSHTMLWriter simply copies these to the CSS style of a span it should be quite easy to to also let NSHTMLWriter take an array.

It’s not a very important feature to have, but hey … it would give me some peace of mind. ­čśë

Filed as Radar#12908144.

Support multiple Shadows in NSHTMLWriter

The current implementation of NSHTMLWriter only supports a single shadow. This shadow is an NSShadow instance set with attribute key NSShadowAttributeName.

NSHTMLWriter maps those core text attributes to their CSS counterparts for display in e.g. UITextView. CSS supports multiple shadows, e.g.

Multiple Shadows

My enhancement request is to allow the NSShadowAttributeName to also be an array of multiple NSShadow instances. Those would simply be transferred to the css style for the span.

This enhancement would make shadows work the same in HTML and CoreText.

Categories: Bug Reports


Leave a Comment

%d bloggers like this: