开发者

Disabling a method - iPhone

开发者 https://www.devze.com 2023-01-20 14:56 出处:网络
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

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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消