[ios] Fixed Radar mode for all device orientations

This commit is contained in:
Alex Zolotarev 2011-09-29 12:26:12 +03:00 committed by Alex Zolotarev
parent fc93314793
commit 28d304204d

View file

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