drawTextInRect on UITextField not called

前端 未结 5 2012
不知归路
不知归路 2020-12-06 06:56

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]

5条回答
  •  温柔的废话
    2020-12-06 07:29

    UITextField does not respond to a - drawTextInRect: message. The code on the page you reference subclasses a UILabel not a UITextField, which is why it didn't work for you.

提交回复
热议问题