project_files/HedgewarsMobile/Classes/SettingsBaseViewController.m
changeset 6672 4f728ccdd06b
parent 6319 b57a37a94ad3
child 6700 e04da46ee43c
--- a/project_files/HedgewarsMobile/Classes/SettingsBaseViewController.m	Sun Feb 12 10:08:58 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/SettingsBaseViewController.m	Sun Feb 12 11:05:26 2012 +0100
@@ -139,6 +139,16 @@
     [[[HedgewarsAppDelegate sharedAppDelegate] mainViewController] dismissModalViewControllerAnimated:YES];
 }
 
+-(void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+    if (IS_IPAD() == NO)
+        return;
+
+    if (self.targetController != nil) {
+        CGRect screenRect = [[UIScreen mainScreen] safeBounds];
+        self.view.frame = CGRectMake(0, 0, 320, screenRect.size.height);
+    }
+}
+
 #pragma mark -
 #pragma mark Table view data source
 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {