I want to disable a method from running if my audio clip is playing.
I have myImage.hidden
working if the audio.playing
is running, how would I go about disabling a method in the sa开发者_JAVA技巧me way?
if (audio.playing == YES) {
// image is hidden
myImage.hidden = YES;
}
Put this code at the top of your method:
if (audio.playing) {
return;
}
精彩评论