I\'m trying to implement the answer to this SO question. The problem is: -[drawTextInRect]
is apparently not called, and setting the shadow in -[drawRect]
This is a bug in the UITextField
API documentation. The documentation indicates that overriding drawTextInRect:
can be used to customize behaviour. This is not the case.
In fact, drawTextInRect:
will never be called on an UITextField
(drawPlaceholderInRect:
will be called neither by the way).
See also http://discussions.apple.com/thread.jspa?threadID=1727596.
Overriding the method on UILabel
works though.