project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6020 c792d4b3e080
parent 6018 3b86826f6665
child 6029 5073285b6599
child 6078 8c0cc07731e5
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sat Sep 24 22:35:31 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Sep 25 02:28:33 2011 +0200
@@ -165,6 +165,8 @@
     [userDefaults synchronize];
 
     // now we can remove the cover with a transition
+    blackView.frame = theFrame;
+    blackView.alpha = 1;
     [UIView beginAnimations:@"fade in" context:NULL];
     [UIView setAnimationDuration:1];
     blackView.alpha = 0;
@@ -210,7 +212,9 @@
 }
 
 -(void) gameHasEndedWithStats:(NSArray *)stats {
-    // display stats page
+    // wrap this around a retain/realse to prevent being deallocated too soon
+    [self retain];
+    // display stats page if there is something to display
     if (stats != nil) {
         StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
         statsPage.statsArray = stats;
@@ -225,6 +229,7 @@
     // can remove the savefile if the replay has ended
     if (self.gameType == gtSave)
         [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil];
+    [self release];
 }
 
 @end