hanumanDev
hanumanDev

Reputation: 6614

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 same way?

if (audio.playing == YES) {
    // image is hidden
    myImage.hidden = YES;
}

Upvotes: 0

Views: 72

Answers (1)

Rits
Rits

Reputation: 5175

Put this code at the top of your method:

if (audio.playing) {
    return;
}

Upvotes: 3

Related Questions