# HG changeset patch # User antonc27 # Date 1445034722 -7200 # Node ID 51cc7ec00c2d45352359ebaff5c343eca8195115 # Parent d8135421833c5430c18adfcbedffef5335ea21d3 - Possible fix for wrong layout on iOS 9 when going back from rotated stats page (for iPad) Note: Tested only in simulator diff -r d8135421833c -r 51cc7ec00c2d project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Fri Oct 16 17:34:06 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sat Oct 17 00:32:02 2015 +0200 @@ -328,8 +328,6 @@ [self updateiPadUIForInterfaceOrientation:toInterfaceOrientation]; - [self.schemeWeaponConfigViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation - duration:duration]; if (self.helpPage) { self.helpPage.view.frame = self.view.frame; @@ -374,6 +372,18 @@ [super viewWillAppear:animated]; } +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + if (IS_IPAD()) + { + // need to call this again in order to fix layout on iOS 9 when going back from rotated stats page + UIInterfaceOrientation currentOrientation = [[UIApplication sharedApplication] statusBarOrientation]; + [self updateiPadUIForInterfaceOrientation:currentOrientation]; + } +} + -(void) didReceiveMemoryWarning { self.imgContainer = nil;