How to Hide a UIButton Title

Discussion in 'iPhone/iPad Programming' started by Bayan, Apr 21, 2012.

  1. macrumors newbie

    Joined:
    Apr 13, 2012
    #1
    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

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    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

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    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