iphone - Retrieving score value when using presentModalViewController to switch views in xcode -
i face problem of retrieving game "highscore" after finishes game.
what did this:
i call presentmodalviewcontroller method when time reaches 0.
gameendingviewcontroller *gameendingview = [[gameendingviewcontroller alloc] initwithnibname:@"gameendingviewcontroller" bundle:nil]; gameendingview.modaltransitionstyle = uimodaltransitionstylecoververtical; [self presentmodalviewcontroller:gameendingview animated:yes]; [gameendingview release];
i want show score attained in main gameloop in gameendingview have. however, seems when use presentmodalviewcontroller method switch view. variable, score, update during gameloop gets reseted. whole game loop in view gamemainview.
could explain me use of presentmodalviewcontroller , how should better solve problem?
thank much.
this not problem modal view. have problem in app logic. should better check out again. idea declaring score property , set breakpoint see changed.
Comments
Post a Comment