forked from organicmaps/organicmaps
[ios] Do not show PP compass on devices without it
This commit is contained in:
parent
c54624cc9a
commit
39c251c9bf
1 changed files with 3 additions and 2 deletions
|
@ -115,8 +115,9 @@
|
|||
BOOL const shouldShowLocationViews = [[MapsAppDelegate theApp].m_locationManager enabledOnMap] && !self.myPositionMode;
|
||||
if (shouldShowLocationViews)
|
||||
{
|
||||
self.compassView.origin = CGPointMake(15, 12.5);
|
||||
self.compassView.hidden = NO;
|
||||
BOOL const headingAvailable = [CLLocationManager headingAvailable];
|
||||
self.compassView.origin = CGPointMake(15 - (headingAvailable ? 0 : self.compassView.width + 17), 12.5);
|
||||
self.compassView.hidden = !headingAvailable;
|
||||
|
||||
CGFloat const width = 134;
|
||||
self.distanceLabel.frame = CGRectMake(self.compassView.maxX + 15, 13, width, 20);
|
||||
|
|
Loading…
Add table
Reference in a new issue