iphone - How can I create a dual function button? -


I have an app that has a start button (with a play image). Once the start button is clicked on the next click, it should act as a punctuation button (also change in the button image). How can we both apply this function to change one for the game and for the rest with the same button?

In this way I handle it

Controller definition in a view is a boolean Defines

  playing bool;   

Then you should do something in the button action

  - (IBAction) playPauseButtonClicked: {ID} Sender {if (play) {[PauseBuilderlight]; } And {[own playbuttoncloth]; } UIButton * theButton = (UIButton *) sender; Game =! [Button set image: playing? @ "PauseImage.png": @ "Play Image." State: UIContolstadt Normal]; } - (Zero) pauseButtonClicked {// Handle Posing} - (Zero) playButtonClicked {// handle to play}}    

Comments