Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drawTextInRect on UITextField not called

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] doesn't make the UITextField's text shadowed.

Another weird thing is that even if my subclass implementations of -[drawTextInRect] and -[drawRect] are completely empty (not even a call to super), the textfield's text is drawn.

like image 584
mrueg Avatar asked Dec 17 '09 10:12

mrueg


1 Answers

I note that -[drawTextInRect] is called once when the UITextField loses focus. Not what I wanted.

like image 79
PKCLsoft Avatar answered Oct 03 '22 17:10

PKCLsoft