drawTextInRect on UITextField not called

前端 未结 5 2011
不知归路
不知归路 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:38

    I guess the method you are looking for is:

    - (CGRect)textRectForBounds:(CGRect)bounds
    

    or possibly

    - (CGRect)editingRectForBounds:(CGRect)bounds
    

提交回复
热议问题