Interesting problem I'm having. Default link nodes look like standard
links and work great on white backgrounds. Unfortunately, part of one
of my screens has a dark background, and I need a lighter link text
for that specific zone (which of course be interspersed with normal
white backgrounds requiring normal links).
The naïve solution is to have multiple TTStyles, a new one in addition
to TTDefaultStyleSheet's linkText:
The issue is that adding a class attr to an < a > tag doesn't get
picked up in the layout.
My workaround for now is to use my TTStyledTextTouchDelegate that I've
added to TTStyledText in my fork:
http://github.com/searls/three20/tree/master
For alternate links I'm not using < a > at all, and am instead just
using < span > element. It'll trigger an event for me
(styledNodeWasTouched:(TTStyledNode*)node) that I can use to treat the
same way I treat a link touch event (in this case, also a custom
delegate method).
Figured I'd point out this workaround to anyone interested. If
somebody knows a correct way to do this as Three20 currently is, feel
free to enlighten me! I'd love to clean this up.