Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

spire.bt

macrumors newbie
Original poster
Apr 8, 2010
22
0
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 :apple:
 
BOOL buttonPressed;


- (IBAction) pressButton: (id) sender {

//Your UIButton that has been attached to an outlet
myButton.selected = !buttonPressed;
buttonPressed = !buttonPressed;

}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.