forked from organicmaps/organicmaps
[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:
parent
3b51b1c8cd
commit
1f10c6ce32
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue