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.
精彩评论