ifステートメントで、メソッドが実行されているかどうかを確認するにはどうすればよいですか?例えば-
if ([(UIButton *)sender isEqual:blueButton] && **showBlueText method is running** )
{
Keep playing.
}
else if ([(UIButton *)sender isEqual:blueButton] && **showBlueText method is NOT running** )
{
Game over.
}
-(void)showBlueText
{
blueText.hidden = NO;
[self performSelector:@selector(hideText) withObject:nil afterDelay:textDelay];
[self performSelector:@selector(showGreenText) withObject:nil afterDelay:hideDelay];
}
明確にするために、「showBlueText」は、このifステートメントとは独立して実行される独自のループの一部です。showBlueTextが現在実行されているかどうかを確認しようとしています。