# HG changeset patch # User antonc27 # Date 1439663887 -7200 # Node ID ccf095d96ef420c14de865bb01db0929ea6c62cb # Parent 432601e160b4dfa827622b876e60ba1fd3820cd3 - Improved fix for UI elements positioning at GameConfigViewController diff -r 432601e160b4 -r ccf095d96ef4 project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sat Aug 15 02:22:17 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sat Aug 15 20:38:07 2015 +0200 @@ -325,7 +325,7 @@ if (IS_IPAD() == NO) return; - [self updateUIForInterfaceOrientation:toInterfaceOrientation]; + [self updateiPadUIForInterfaceOrientation:toInterfaceOrientation]; [self.schemeWeaponConfigViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; @@ -335,7 +335,7 @@ } } -- (void)updateUIForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +- (void)updateiPadUIForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { @@ -363,9 +363,12 @@ // if (IS_IPAD()) // [NSThread detachNewThreadSelector:@selector(loadNiceHogs) toTarget:self withObject:nil]; - // we assume here what 'statusBarOrientation' will never be changed manually! - UIInterfaceOrientation currentOrientation = [[UIApplication sharedApplication] statusBarOrientation]; - [self updateUIForInterfaceOrientation:currentOrientation]; + if (IS_IPAD()) + { + // we assume here what 'statusBarOrientation' will never be changed manually! + UIInterfaceOrientation currentOrientation = [[UIApplication sharedApplication] statusBarOrientation]; + [self updateiPadUIForInterfaceOrientation:currentOrientation]; + } [self.mapConfigViewController viewWillAppear:animated]; [self.teamConfigViewController viewWillAppear:animated];