How to Hide a UIButton Title

Discussion in 'iOS Programming' started by Bayan, Apr 21, 2012.

  1. macrumors newbie

    Apr 13, 2012
    Greetings everyone,

    Does any one know how to hide the title of a UIButton?

    I want to put data in it to use it in my code but I don't want it displayed.

    Thanks in advance!
  2. macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    As far as I know the only way to have a button up with no text is to set the text to an empty string "" or perhaps nil.

    Buttons have states too, so if you want the title to appear under a particular state, you could try setting the title for each state and then the system will take care of displaying the title.
  3. macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    You want to put data in there, but don't want it displayed, I smell a bad code coming in. What is your exact goal, you want to send the data to another method or something?

Share This Page