only show heading view once lock acquired
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -2678,8 +2678,6 @@ | @@ -2678,8 +2678,6 @@ | ||
2678 | 2678 | ||
2679 | [self addSubview:userHeadingTrackingView]; | 2679 | [self addSubview:userHeadingTrackingView]; |
2680 | 2680 | ||
2681 | - [UIView animateWithDuration:0.5 animations:^(void) { userHeadingTrackingView.alpha = 1.0; }]; | ||
2682 | - | ||
2683 | userLocationTrackingView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TrackingDot.png"]]; | 2681 | userLocationTrackingView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TrackingDot.png"]]; |
2684 | 2682 | ||
2685 | userLocationTrackingView.center = CGPointMake(round([self bounds].size.width / 2), | 2683 | userLocationTrackingView.center = CGPointMake(round([self bounds].size.width / 2), |
@@ -2874,6 +2872,9 @@ | @@ -2874,6 +2872,9 @@ | ||
2874 | 2872 | ||
2875 | if (newHeading.trueHeading != 0 && self.userTrackingMode == RMUserTrackingModeFollowWithHeading) | 2873 | if (newHeading.trueHeading != 0 && self.userTrackingMode == RMUserTrackingModeFollowWithHeading) |
2876 | { | 2874 | { |
2875 | + if (userHeadingTrackingView.alpha < 1.0) | ||
2876 | + [UIView animateWithDuration:0.5 animations:^(void) { userHeadingTrackingView.alpha = 1.0; }]; | ||
2877 | + | ||
2877 | [CATransaction begin]; | 2878 | [CATransaction begin]; |
2878 | [CATransaction setAnimationDuration:0.5]; | 2879 | [CATransaction setAnimationDuration:0.5]; |
2879 | [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; | 2880 | [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; |
-
Please register or login to post a comment