开发者

Disabling a method - iPhone

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜