I have a layer in my game. At finishing of game I want to show user an UIAlertView for restarting or quitting the game. But it is not working. I am also given the delegate UIAlertViewDelegate to layer.
Any Solutions?
My Code follows,
-(void)gameFinished{ [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
[self unschedule:@selector(checkForCollision)]; [self unschedule:@selector(dropObject)]; [self stopBackgroundMusic];
[self startNewForegroundMusic:@"GameOver" ofType:@"caf"]; [self playForegroundMusic];
[[Director sharedDirector] pause]; UIAlertView *view=[[UIAlertView alloc] initWithTitle:@"Game Finished" message:@"Want to play again?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes"]; [view show]; [view release]; }