How to add new custom property to UITextField?

Discussion in 'iOS Programming' started by sspbond007, Apr 17, 2009.

  1. sspbond007
    Expand Collapse
    macrumors member

    Joined:
    Aug 19, 2008
    #1
    Hi

    Is there any way to add new custom property to UITextField, like we do add custom methods using category?

    Thanks..
     
  2. robbieduncan
    Expand Collapse
    Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I think you'd have to subclass it to add a new property...
     
  3. mccannmarc
    Expand Collapse
    macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #3
    Yeah definately a subclass, you can't add properties using categories as I found out just the other day
     
  4. sspbond007
    Expand Collapse
    thread starter macrumors member

    Joined:
    Aug 19, 2008

Share This Page