[Solved] How Make the players waiting [closed]


Create a date object when the player loses

NSDate *stopTime = [NSDate dateWithTimeIntervalSinceNow:0];

and store that date in NSUserDefaults. To check if the user has waited long enough, read the date from NSUserDefaults, and compute the delta between the stop time and the current time. For example, if the user needs to wait 15 minutes, then

NSTimeInterval delta = [stopTime timeIntervalSinceNow];
delta = -delta;
if ( delta > 15 * 60 )
    // OK to play
else
    // still waiting

solved How Make the players waiting [closed]