S spire.bt macrumors newbie Original poster May 18, 2010 #1 is it possible to make a button push on push off on iphone application? I have a timer with two IBActions one is start and the other one is stop but I want to activate start and stop on the same button I know this is possible for mac applications
is it possible to make a button push on push off on iphone application? I have a timer with two IBActions one is start and the other one is stop but I want to activate start and stop on the same button I know this is possible for mac applications
dejo Moderator emeritus May 18, 2010 #2 How about using a UIButton whose title toggles between Start and Stop?
ulbador macrumors 68000 May 18, 2010 #3 BOOL buttonPressed; - (IBAction) pressButton: (id) sender { //Your UIButton that has been attached to an outlet myButton.selected = !buttonPressed; buttonPressed = !buttonPressed; }
BOOL buttonPressed; - (IBAction) pressButton: (id) sender { //Your UIButton that has been attached to an outlet myButton.selected = !buttonPressed; buttonPressed = !buttonPressed; }