- Fix for show/hide helpPage animations ios-revival
authorantonc27 <antonc27@mail.ru>
Sat, 15 Aug 2015 00:59:33 +0200
branchios-revival
changeset 11122 2b4e89e5203b
parent 11121 182a42b79610
child 11123 bd58a851eb8d
- Fix for show/hide helpPage animations
project_files/HedgewarsMobile/Classes/GameConfigViewController.m
project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Sat Aug 15 00:22:04 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Sat Aug 15 00:59:33 2015 +0200
@@ -71,9 +71,9 @@
             self.helpPage.view.alpha = 0;
             self.helpPage.view.frame = self.view.frame;
             [self.view addSubview:self.helpPage.view];
-            [UIView beginAnimations:@"helplobby" context:NULL];
-            self.helpPage.view.alpha = 1;
-            [UIView commitAnimations];
+            [UIView animateWithDuration:0.5 animations:^{
+                self.helpPage.view.alpha = 1;
+            }];
             break;
         default:
             DLog(@"Nope");
--- a/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m	Sat Aug 15 00:22:04 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m	Sat Aug 15 00:59:33 2015 +0200
@@ -55,10 +55,11 @@
 }
 
 -(IBAction) dismiss {
-    [UIView beginAnimations:@"dismiss help" context:NULL];
-    self.view.alpha = 0;
-    [UIView commitAnimations];
-    [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
+    [UIView animateWithDuration:0.5 animations:^{
+        self.view.alpha = 0;
+    } completion:^(BOOL finished){
+        [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0];
+    }];
 }
 
 @end