Overriding UITextField's drawing methods for custom font

Discussion in 'iOS Programming' started by mccannmarc, Apr 18, 2009.

  1. mccannmarc macrumors 6502


    Aug 15, 2008
    Manchester, UK
    Has anyone successfully managed to get a UITextField to display a custom font using Glyphs?

    I've subclassed it and tried overriding both the drawRect and the drawTextInRect methods but they never seem to get invoked. I've read somewhere that a UITextField keeps an internal UILabel which it uses to draw its text and the drawText in the UITextField goes straight to its UILabels drawTextInRect method so its pointless overriding it anyway! Bloody stupid if thats the case...

    If its the case has anyone found a way round it? I really don't fancy having to add input functionality to a UILabel or something just so I can draw my custom font when entering text :mad:

Share This Page