★ TouchArcade needs your help. Click here to support us on Patreon.

Help with making a button

11-20-2008, 09:41 PM
#1
Joined: Jul 2008
Posts: 30
Help with making a button

How do you tell it during the button is held down do this, and when you let go of the button do this?

Thanks so much

Last edited by MrPenguin9; 11-20-2008 at 11:05 PM.
11-25-2008, 10:19 PM
#2
Quote:
Originally Posted by MrPenguin9 View Post
How do you tell it during the button is held down do this, and when you let go of the button do this?

Thanks so much
The easiest way is to use interface builder, i think.
create your actions first (one for when the button is held down and one for when it's let go), then open interface builder and in the connections tab drag the new actions (a blue line will appear) to the button. A popup will then ask you when you would like to apply the action you selected and you can choose between lots of different situations (for instance 'touch up inside' for when the button is pressed.). Hope that helps a bit