[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
This commit is contained in:
Alex Zolotarev 2011-09-02 13:46:45 +03:00 committed by Alex Zolotarev
parent 3b51b1c8cd
commit 1f10c6ce32

View file

@ -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