I have code in my Objective-C SpriteKit game to loop a menu theme, but I don't quite know how to get it to stop looping. Here's what I'm using:
[self runAction:[SKAction sequence:[NSArray arrayWithObjects:[SKAction playSoundFileNamed:@"Main Menu Warmup 1.m4a" waitForCompletion:YES], [SKAction runBlock:^{
[self manageMusic];
}], nil]]];
That loops the music just fine, but if I try to call [self removeAllActions]
to stop the music later, then the music continues playing. Any ideas on how to fix this?