From 1f10c6ce32802096873ed848598293f610281d9b Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Fri, 2 Sep 2011 13:46:45 +0300 Subject: [PATCH] [ios] Fixed landscape startup bug @NOTE View frame is set from XIB on startup, and is always portrait, correct orientation change message comes only after all initialization is already finished, and only at this moment view frame has correct dimensions --- iphone/Maps/Classes/MapViewController.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 11477ba524..b6e2cf6dc0 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -91,9 +91,6 @@ storage::Storage m_storage; m_CurrentAction = NOTHING; - // initialize with currently active screen orientation - [self didRotateFromInterfaceOrientation: self.interfaceOrientation]; - // restore previous screen position bool res = m_framework->LoadState(); @@ -275,6 +272,8 @@ NSInteger compareAddress(id l, id r, void * context) case UIInterfaceOrientationLandscapeRight: newOrientation = EOrientation270; break; } m_framework->SetOrientation(newOrientation); + // needed to correctly startup in landscape + [self.view layoutSubviews]; } - (void) OnTerminate