objective c - How to make a uibutton with touch down action and touch up inside action -


i need make 1 button 2 actions, touch down used play sound , touch inside stop playing sound when let go of button

connect 2 methods both these actions.

[self.yourbtn addtarget:self action:@selector(touchdownmethod:) forcontrolevents:uicontroleventtouchdown]; [self.yourbtn addtarget:self action:@selector(touchupinsidemethod:) forcontrolevents:uicontroleventtouchupinside]; 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -