开发者

Howto use UITextField's drawTextInRect: method

I have a UITextField with a custom background, but now i want to change the text's position, so i have to use drawTextInRect:, but i can't figure out how to use it. The documentation says:

You should not call this method directly. If you want to customize the drawing behavior for the text, you can override this method to do your drawing.

B开发者_StackOverflowut how to override a method?

Thanks in advance


Just implement the method yourself, in your subclass of UITextField. If the OS finds an implementation of a method in a class, it calls it. If it doesn't find it, it looks in the class's superclass.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜