Making a UIButton appear to be clicked

Discussion in 'iOS Programming' started by JGoose, Mar 28, 2010.

  1. JGoose macrumors member

    Joined:
    Feb 12, 2010
    #1
    How can I make a UIButton appear to be clicked without the user pressing it.

    Basically, I want the highlighted image of the button to appear for a second then return to the default image.
     
  2. HarryWorksInc macrumors regular

    Joined:
    Feb 21, 2010
    #2
    well than I think your going to have to create an image of the button for both clicked and un-clicked views and then just programmatically switch out the photos
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    Don't know for sure. Try the setHighlighted: method to make the button appear to have been touched. Set a timer or delayedPerform and unhighlight the button after a half second or so. You may have to consider what happens if the user really touches the button while it's in this state.
     

Share This Page