views:

190

answers:

1

Hi,

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.

But how to override a method?

Thanks in advance

A: 

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.

Ben Gottlieb
That worked, thanks!
JWVD