forked from organicmaps/organicmaps
[ios] Fixed Radar mode for all device orientations
This commit is contained in:
parent
fc93314793
commit
28d304204d
1 changed files with 11 additions and 0 deletions
|
@ -143,6 +143,16 @@ static void OnSearchResultCallback(search::Result const & res, int queryId)
|
|||
g_searchVC = nil;
|
||||
}
|
||||
|
||||
- (void)fixHeadingOrientation
|
||||
{
|
||||
m_locationManager.headingOrientation = (CLDeviceOrientation)[UIDevice currentDevice].orientation;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[self fixHeadingOrientation];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
// hide keyboard immediately
|
||||
|
@ -302,6 +312,7 @@ static void OnSearchResultCallback(search::Result const & res, int queryId)
|
|||
- (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation
|
||||
{
|
||||
[[self.navigationController.viewControllers objectAtIndex:0] didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
[self fixHeadingOrientation];
|
||||
}
|
||||
|
||||
- (void)addResult:(id)result
|
||||
|
|
Loading…
Add table
Reference in a new issue