Another quick one:
If I perform something like this:
runningAnimation = YES;
[self performSelector:@selector(animationsComplete) withObject:nil afterDelay:0.1[;
// Return to main function
-(void) mainFunction
{
while (runningAnimation)
{
continue;
}
}
// And, animationsComplete looks like this:
-(void) animationsComplete
{
runningAnimation = NO;
}
the Program never seems to get out of the while loop. Can anyone tell me why this is?
On another note, if this type of "wait in my code for something to finish executing" can't really ever work in the sense that I was trying to do, is there another way to do the same thing? To just pause in a function whilst waiting for a call of
[self performSelector:withObject:afterDelay:]
to complete? Sorry if this seems like an amateur question. I'm an amateur.