M MrPenguin9 macrumors member Original poster Aug 1, 2008 59 0 Nov 20, 2008 #1 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
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
J jnic macrumors 6502a Oct 24, 2008 567 0 Cambridge Nov 21, 2008 #2 In Interface Builder add a couple of IBActions for (respectively) Touch Down and Touch Up Inside.
N Niiro13 macrumors 68000 Feb 12, 2008 1,719 0 Illinois Nov 21, 2008 #3 And if you want to do it programatically, then you'd go Code: [myButton addTarget:self action:@selector(touchDownAction:) forControlEvents:UIControlEventTouchDown]; [myButton addTarget:self action:@selector(touchUpAction:) forControlEvents:UIControlEventTouchUpInside];
And if you want to do it programatically, then you'd go Code: [myButton addTarget:self action:@selector(touchDownAction:) forControlEvents:UIControlEventTouchDown]; [myButton addTarget:self action:@selector(touchUpAction:) forControlEvents:UIControlEventTouchUpInside];