Authored by Justin R. Miller

first cut of tracking button iOS 7 fixes

@@ -32,9 +32,10 @@ @@ -32,9 +32,10 @@
32 #import "RMUserLocation.h" 32 #import "RMUserLocation.h"
33 33
34 typedef enum { 34 typedef enum {
35 - RMUserTrackingButtonStateActivity = 0,  
36 - RMUserTrackingButtonStateLocation = 1,  
37 - RMUserTrackingButtonStateHeading = 2 35 + RMUserTrackingButtonStateNone = 0,
  36 + RMUserTrackingButtonStateActivity = 1,
  37 + RMUserTrackingButtonStateLocation = 2,
  38 + RMUserTrackingButtonStateHeading = 3
38 } RMUserTrackingButtonState; 39 } RMUserTrackingButtonState;
39 40
40 @interface RMUserTrackingBarButtonItem () 41 @interface RMUserTrackingBarButtonItem ()
@@ -45,7 +46,7 @@ typedef enum { @@ -45,7 +46,7 @@ typedef enum {
45 @property (nonatomic, assign) RMUserTrackingButtonState state; 46 @property (nonatomic, assign) RMUserTrackingButtonState state;
46 47
47 - (void)createBarButtonItem; 48 - (void)createBarButtonItem;
48 -- (void)updateAppearance; 49 +- (void)updateState;
49 - (void)changeMode:(id)sender; 50 - (void)changeMode:(id)sender;
50 51
51 @end 52 @end
@@ -85,21 +86,26 @@ typedef enum { @@ -85,21 +86,26 @@ typedef enum {
85 86
86 - (void)createBarButtonItem 87 - (void)createBarButtonItem
87 { 88 {
88 - _segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@""]];  
89 - _segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;  
90 - [_segmentedControl setWidth:32.0 forSegmentAtIndex:0];  
91 - _segmentedControl.userInteractionEnabled = NO;  
92 - _segmentedControl.tintColor = self.tintColor;  
93 - _segmentedControl.center = self.customView.center;  
94 -  
95 - [self.customView addSubview:_segmentedControl]; 89 + if (RMPreVersion7)
  90 + {
  91 + _segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@""]];
  92 + _segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
  93 + [_segmentedControl setWidth:32.0 forSegmentAtIndex:0];
  94 + _segmentedControl.userInteractionEnabled = NO;
  95 + _segmentedControl.tintColor = self.tintColor;
  96 + _segmentedControl.center = self.customView.center;
  97 +
  98 + [self.customView addSubview:_segmentedControl];
  99 + }
96 100
97 - _buttonImageView = [[UIImageView alloc] initWithImage:[RMMapView resourceImageNamed:@"TrackingLocation.png"]]; 101 + _buttonImageView = [[UIImageView alloc] initWithImage:nil];
98 _buttonImageView.contentMode = UIViewContentModeCenter; 102 _buttonImageView.contentMode = UIViewContentModeCenter;
99 _buttonImageView.frame = CGRectMake(0, 0, 32, 32); 103 _buttonImageView.frame = CGRectMake(0, 0, 32, 32);
100 _buttonImageView.center = self.customView.center; 104 _buttonImageView.center = self.customView.center;
101 _buttonImageView.userInteractionEnabled = NO; 105 _buttonImageView.userInteractionEnabled = NO;
102 106
  107 + [self updateImage];
  108 +
103 [self.customView addSubview:_buttonImageView]; 109 [self.customView addSubview:_buttonImageView];
104 110
105 _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; 111 _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
@@ -111,7 +117,7 @@ typedef enum { @@ -111,7 +117,7 @@ typedef enum {
111 117
112 [((UIControl *)self.customView) addTarget:self action:@selector(changeMode:) forControlEvents:UIControlEventTouchUpInside]; 118 [((UIControl *)self.customView) addTarget:self action:@selector(changeMode:) forControlEvents:UIControlEventTouchUpInside];
113 119
114 - _state = RMUserTrackingButtonStateLocation; 120 + _state = RMUserTrackingButtonStateNone;
115 } 121 }
116 122
117 - (void)dealloc 123 - (void)dealloc
@@ -133,7 +139,7 @@ typedef enum { @@ -133,7 +139,7 @@ typedef enum {
133 [_mapView addObserver:self forKeyPath:@"userTrackingMode" options:NSKeyValueObservingOptionNew context:nil]; 139 [_mapView addObserver:self forKeyPath:@"userTrackingMode" options:NSKeyValueObservingOptionNew context:nil];
134 [_mapView addObserver:self forKeyPath:@"userLocation.location" options:NSKeyValueObservingOptionNew context:nil]; 140 [_mapView addObserver:self forKeyPath:@"userLocation.location" options:NSKeyValueObservingOptionNew context:nil];
135 141
136 - [self updateAppearance]; 142 + [self updateState];
137 } 143 }
138 } 144 }
139 145
@@ -141,23 +147,81 @@ typedef enum { @@ -141,23 +147,81 @@ typedef enum {
141 { 147 {
142 [super setTintColor:newTintColor]; 148 [super setTintColor:newTintColor];
143 149
144 - _segmentedControl.tintColor = newTintColor; 150 + if (RMPreVersion7)
  151 + _segmentedControl.tintColor = newTintColor;
  152 + else
  153 + [self updateImage];
145 } 154 }
146 155
147 #pragma mark - 156 #pragma mark -
148 157
149 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 158 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
150 { 159 {
151 - [self updateAppearance]; 160 + [self updateState];
152 } 161 }
153 162
154 #pragma mark - 163 #pragma mark -
155 164
156 -- (void)updateAppearance 165 +- (void)updateImage
  166 +{
  167 + if (RMPreVersion7)
  168 + {
  169 + if (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading)
  170 + _buttonImageView.image = [RMMapView resourceImageNamed:@"TrackingHeading.png"];
  171 + else
  172 + _buttonImageView.image = [RMMapView resourceImageNamed:@"TrackingLocation.png"];
  173 + }
  174 + else
  175 + {
  176 + CGRect rect = CGRectMake(0, 0, self.customView.bounds.size.width, self.customView.bounds.size.height);
  177 +
  178 + UIGraphicsBeginImageContextWithOptions(rect.size, NO, [[UIScreen mainScreen] scale]);
  179 +
  180 + CGContextRef context = UIGraphicsGetCurrentContext();
  181 +
  182 + UIImage *image;
  183 +
  184 + if (_mapView.userTrackingMode == RMUserTrackingModeNone || ! _mapView)
  185 + image = [RMMapView resourceImageNamed:@"TrackingLocationOffMask.png"];
  186 + else if (_mapView.userTrackingMode == RMUserTrackingModeFollow)
  187 + image = [RMMapView resourceImageNamed:@"TrackingLocationMask.png"];
  188 + else if (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading)
  189 + image = [RMMapView resourceImageNamed:@"TrackingHeadingMask.png"];
  190 +
  191 + UIGraphicsPushContext(context);
  192 +
  193 + [image drawAtPoint:CGPointMake((rect.size.width - image.size.width) / 2, (rect.size.height - image.size.height) / 2)];
  194 +
  195 + UIGraphicsPopContext();
  196 +
  197 + CGContextSetBlendMode(context, kCGBlendModeSourceIn);
  198 +
  199 + CGContextSetFillColorWithColor(context, self.tintColor.CGColor);
  200 + CGContextFillRect(context, rect);
  201 +
  202 + _buttonImageView.image = UIGraphicsGetImageFromCurrentImageContext();
  203 +
  204 + UIGraphicsEndImageContext();
  205 +
  206 + if (_mapView.userTrackingMode == RMUserTrackingModeFollow || _mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading)
  207 + {
  208 + _buttonImageView.layer.backgroundColor = CGColorCreateCopyWithAlpha(self.tintColor.CGColor, 0.1);
  209 + _buttonImageView.layer.cornerRadius = 4;
  210 + }
  211 + else
  212 + {
  213 + _buttonImageView.layer.backgroundColor = [[UIColor clearColor] CGColor];
  214 + _buttonImageView.layer.cornerRadius = 0;
  215 + }
  216 + }
  217 +}
  218 +
  219 +- (void)updateState
157 { 220 {
158 // "selection" state 221 // "selection" state
159 // 222 //
160 - _segmentedControl.selectedSegmentIndex = (_mapView.userTrackingMode == RMUserTrackingModeNone ? UISegmentedControlNoSegment : 0); 223 + if (RMPreVersion7)
  224 + _segmentedControl.selectedSegmentIndex = (_mapView.userTrackingMode == RMUserTrackingModeNone ? UISegmentedControlNoSegment : 0);
161 225
162 // activity/image state 226 // activity/image state
163 // 227 //
@@ -190,7 +254,8 @@ typedef enum { @@ -190,7 +254,8 @@ typedef enum {
190 } 254 }
191 else 255 else
192 { 256 {
193 - if ((_mapView.userTrackingMode != RMUserTrackingModeFollowWithHeading && _state != RMUserTrackingButtonStateLocation) || 257 + if ((_mapView.userTrackingMode == RMUserTrackingModeNone && _state != RMUserTrackingButtonStateNone) ||
  258 + (_mapView.userTrackingMode == RMUserTrackingModeFollow && _state != RMUserTrackingButtonStateLocation) ||
194 (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading && _state != RMUserTrackingButtonStateHeading)) 259 (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading && _state != RMUserTrackingButtonStateHeading))
195 { 260 {
196 // if image state doesn't match mode, update it 261 // if image state doesn't match mode, update it
@@ -205,7 +270,8 @@ typedef enum { @@ -205,7 +270,8 @@ typedef enum {
205 } 270 }
206 completion:^(BOOL finished) 271 completion:^(BOOL finished)
207 { 272 {
208 - _buttonImageView.image = [RMMapView resourceImageNamed:(_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading ? @"TrackingHeading.png" : @"TrackingLocation.png")]; 273 + [self updateImage];
  274 +
209 _buttonImageView.hidden = NO; 275 _buttonImageView.hidden = NO;
210 276
211 [_activityView stopAnimating]; 277 [_activityView stopAnimating];
@@ -217,7 +283,12 @@ typedef enum { @@ -217,7 +283,12 @@ typedef enum {
217 }]; 283 }];
218 }]; 284 }];
219 285
220 - _state = (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading ? RMUserTrackingButtonStateHeading : RMUserTrackingButtonStateLocation); 286 + if (_mapView.userTrackingMode == RMUserTrackingModeNone)
  287 + _state = RMUserTrackingButtonStateNone;
  288 + else if (_mapView.userTrackingMode == RMUserTrackingModeFollow)
  289 + _state = RMUserTrackingButtonStateLocation;
  290 + else if (_mapView.userTrackingMode == RMUserTrackingModeFollowWithHeading)
  291 + _state = RMUserTrackingButtonStateHeading;
221 } 292 }
222 } 293 }
223 } 294 }
@@ -253,7 +324,7 @@ typedef enum { @@ -253,7 +324,7 @@ typedef enum {
253 } 324 }
254 } 325 }
255 326
256 - [self updateAppearance]; 327 + [self updateState];
257 } 328 }
258 329
259 @end 330 @end
@@ -139,6 +139,17 @@ @@ -139,6 +139,17 @@
139 DD97C11616489678007C4652 /* libProj4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD97C11516489678007C4652 /* libProj4.a */; }; 139 DD97C11616489678007C4652 /* libProj4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD97C11516489678007C4652 /* libProj4.a */; };
140 DD98B6FA14D76B930092882F /* RMMapBoxSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DD98B6F814D76B930092882F /* RMMapBoxSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 140 DD98B6FA14D76B930092882F /* RMMapBoxSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DD98B6F814D76B930092882F /* RMMapBoxSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
141 DD98B6FB14D76B930092882F /* RMMapBoxSource.m in Sources */ = {isa = PBXBuildFile; fileRef = DD98B6F914D76B930092882F /* RMMapBoxSource.m */; }; 141 DD98B6FB14D76B930092882F /* RMMapBoxSource.m in Sources */ = {isa = PBXBuildFile; fileRef = DD98B6F914D76B930092882F /* RMMapBoxSource.m */; };
  142 + DDA257011798A95600BBB325 /* TrackingLocationOffMaskLandscape@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256F61798A95600BBB325 /* TrackingLocationOffMaskLandscape@2x.png */; };
  143 + DDA257021798A95600BBB325 /* TrackingLocationOffMask@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256F71798A95600BBB325 /* TrackingLocationOffMask@2x.png */; };
  144 + DDA257031798A95600BBB325 /* TrackingLocationMaskLandscape@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256F81798A95600BBB325 /* TrackingLocationMaskLandscape@2x.png */; };
  145 + DDA257041798A95600BBB325 /* TrackingLocationMask@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256F91798A95600BBB325 /* TrackingLocationMask@2x.png */; };
  146 + DDA257051798A95600BBB325 /* TrackingHeadingMaskLandscape@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FA1798A95600BBB325 /* TrackingHeadingMaskLandscape@2x.png */; };
  147 + DDA257061798A95600BBB325 /* TrackingHeadingMask@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FB1798A95600BBB325 /* TrackingHeadingMask@2x.png */; };
  148 + DDA257071798A95600BBB325 /* Compass@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FC1798A95600BBB325 /* Compass@2x.png */; };
  149 + DDA257081798A95600BBB325 /* Compass.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FD1798A95600BBB325 /* Compass.png */; };
  150 + DDA257091798A95600BBB325 /* TrackingHeadingMask.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FE1798A95600BBB325 /* TrackingHeadingMask.png */; };
  151 + DDA2570A1798A95600BBB325 /* TrackingLocationOffMask.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA256FF1798A95600BBB325 /* TrackingLocationOffMask.png */; };
  152 + DDA2570B1798A95600BBB325 /* TrackingLocationMask.png in Resources */ = {isa = PBXBuildFile; fileRef = DDA257001798A95600BBB325 /* TrackingLocationMask.png */; };
142 DDA6B8BD155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h in Headers */ = {isa = PBXBuildFile; fileRef = DDA6B8BB155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; 153 DDA6B8BD155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h in Headers */ = {isa = PBXBuildFile; fileRef = DDA6B8BB155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
143 DDA6B8BE155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA6B8BC155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m */; }; 154 DDA6B8BE155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA6B8BC155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m */; };
144 DDC4BED5152E3BD700089409 /* RMInteractiveSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DDC4BED3152E3BD700089409 /* RMInteractiveSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 155 DDC4BED5152E3BD700089409 /* RMInteractiveSource.h in Headers */ = {isa = PBXBuildFile; fileRef = DDC4BED3152E3BD700089409 /* RMInteractiveSource.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -300,6 +311,17 @@ @@ -300,6 +311,17 @@
300 DD97C11516489678007C4652 /* libProj4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libProj4.a; path = ../Proj4/libProj4.a; sourceTree = "<group>"; }; 311 DD97C11516489678007C4652 /* libProj4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libProj4.a; path = ../Proj4/libProj4.a; sourceTree = "<group>"; };
301 DD98B6F814D76B930092882F /* RMMapBoxSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMMapBoxSource.h; sourceTree = "<group>"; }; 312 DD98B6F814D76B930092882F /* RMMapBoxSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMMapBoxSource.h; sourceTree = "<group>"; };
302 DD98B6F914D76B930092882F /* RMMapBoxSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMMapBoxSource.m; sourceTree = "<group>"; }; 313 DD98B6F914D76B930092882F /* RMMapBoxSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMMapBoxSource.m; sourceTree = "<group>"; };
  314 + DDA256F61798A95600BBB325 /* TrackingLocationOffMaskLandscape@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingLocationOffMaskLandscape@2x.png"; path = "Map/Resources/TrackingLocationOffMaskLandscape@2x.png"; sourceTree = "<group>"; };
  315 + DDA256F71798A95600BBB325 /* TrackingLocationOffMask@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingLocationOffMask@2x.png"; path = "Map/Resources/TrackingLocationOffMask@2x.png"; sourceTree = "<group>"; };
  316 + DDA256F81798A95600BBB325 /* TrackingLocationMaskLandscape@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingLocationMaskLandscape@2x.png"; path = "Map/Resources/TrackingLocationMaskLandscape@2x.png"; sourceTree = "<group>"; };
  317 + DDA256F91798A95600BBB325 /* TrackingLocationMask@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingLocationMask@2x.png"; path = "Map/Resources/TrackingLocationMask@2x.png"; sourceTree = "<group>"; };
  318 + DDA256FA1798A95600BBB325 /* TrackingHeadingMaskLandscape@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingHeadingMaskLandscape@2x.png"; path = "Map/Resources/TrackingHeadingMaskLandscape@2x.png"; sourceTree = "<group>"; };
  319 + DDA256FB1798A95600BBB325 /* TrackingHeadingMask@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TrackingHeadingMask@2x.png"; path = "Map/Resources/TrackingHeadingMask@2x.png"; sourceTree = "<group>"; };
  320 + DDA256FC1798A95600BBB325 /* Compass@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Compass@2x.png"; path = "Map/Resources/Compass@2x.png"; sourceTree = "<group>"; };
  321 + DDA256FD1798A95600BBB325 /* Compass.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Compass.png; path = Map/Resources/Compass.png; sourceTree = "<group>"; };
  322 + DDA256FE1798A95600BBB325 /* TrackingHeadingMask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = TrackingHeadingMask.png; path = Map/Resources/TrackingHeadingMask.png; sourceTree = "<group>"; };
  323 + DDA256FF1798A95600BBB325 /* TrackingLocationOffMask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = TrackingLocationOffMask.png; path = Map/Resources/TrackingLocationOffMask.png; sourceTree = "<group>"; };
  324 + DDA257001798A95600BBB325 /* TrackingLocationMask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = TrackingLocationMask.png; path = Map/Resources/TrackingLocationMask.png; sourceTree = "<group>"; };
303 DDA6B8BB155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMUserTrackingBarButtonItem.h; sourceTree = "<group>"; }; 325 DDA6B8BB155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMUserTrackingBarButtonItem.h; sourceTree = "<group>"; };
304 DDA6B8BC155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMUserTrackingBarButtonItem.m; sourceTree = "<group>"; }; 326 DDA6B8BC155CAB67003DB5D8 /* RMUserTrackingBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMUserTrackingBarButtonItem.m; sourceTree = "<group>"; };
305 DDC4BED3152E3BD700089409 /* RMInteractiveSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMInteractiveSource.h; sourceTree = "<group>"; }; 327 DDC4BED3152E3BD700089409 /* RMInteractiveSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMInteractiveSource.h; sourceTree = "<group>"; };
@@ -597,8 +619,12 @@ @@ -597,8 +619,12 @@
597 DD932BC1165C287600D69D49 /* Resources */ = { 619 DD932BC1165C287600D69D49 /* Resources */ = {
598 isa = PBXGroup; 620 isa = PBXGroup;
599 children = ( 621 children = (
  622 + DD280D1216EFDDD30014B549 /* examples.map-z2effxa8.json */,
  623 + DD280D1316EFDDD30014B549 /* examples.map-zswgei2n.json */,
600 DD932BA5165C287000D69D49 /* mapbox.png */, 624 DD932BA5165C287000D69D49 /* mapbox.png */,
601 DD932BA6165C287000D69D49 /* mapbox@2x.png */, 625 DD932BA6165C287000D69D49 /* mapbox@2x.png */,
  626 + DDA256FD1798A95600BBB325 /* Compass.png */,
  627 + DDA256FC1798A95600BBB325 /* Compass@2x.png */,
602 DD932BA9165C287000D69D49 /* HeadingAngleSmall.png */, 628 DD932BA9165C287000D69D49 /* HeadingAngleSmall.png */,
603 DD932BAA165C287000D69D49 /* HeadingAngleSmall@2x.png */, 629 DD932BAA165C287000D69D49 /* HeadingAngleSmall@2x.png */,
604 DD94D46816C2E064003D5739 /* HeadingAngleMedium.png */, 630 DD94D46816C2E064003D5739 /* HeadingAngleMedium.png */,
@@ -613,10 +639,17 @@ @@ -613,10 +639,17 @@
613 DD932BAE165C287000D69D49 /* TrackingDotHalo@2x.png */, 639 DD932BAE165C287000D69D49 /* TrackingDotHalo@2x.png */,
614 DD932BAF165C287000D69D49 /* TrackingHeading.png */, 640 DD932BAF165C287000D69D49 /* TrackingHeading.png */,
615 DD932BB0165C287000D69D49 /* TrackingHeading@2x.png */, 641 DD932BB0165C287000D69D49 /* TrackingHeading@2x.png */,
  642 + DDA256FE1798A95600BBB325 /* TrackingHeadingMask.png */,
  643 + DDA256FB1798A95600BBB325 /* TrackingHeadingMask@2x.png */,
  644 + DDA256FA1798A95600BBB325 /* TrackingHeadingMaskLandscape@2x.png */,
616 DD932BB1165C287000D69D49 /* TrackingLocation.png */, 645 DD932BB1165C287000D69D49 /* TrackingLocation.png */,
617 DD932BB2165C287000D69D49 /* TrackingLocation@2x.png */, 646 DD932BB2165C287000D69D49 /* TrackingLocation@2x.png */,
618 - DD280D1216EFDDD30014B549 /* examples.map-z2effxa8.json */,  
619 - DD280D1316EFDDD30014B549 /* examples.map-zswgei2n.json */, 647 + DDA257001798A95600BBB325 /* TrackingLocationMask.png */,
  648 + DDA256F91798A95600BBB325 /* TrackingLocationMask@2x.png */,
  649 + DDA256F81798A95600BBB325 /* TrackingLocationMaskLandscape@2x.png */,
  650 + DDA256FF1798A95600BBB325 /* TrackingLocationOffMask.png */,
  651 + DDA256F71798A95600BBB325 /* TrackingLocationOffMask@2x.png */,
  652 + DDA256F61798A95600BBB325 /* TrackingLocationOffMaskLandscape@2x.png */,
620 ); 653 );
621 name = Resources; 654 name = Resources;
622 path = ..; 655 path = ..;
@@ -805,6 +838,7 @@ @@ -805,6 +838,7 @@
805 DD932BB3165C287000D69D49 /* mapbox.png in Resources */, 838 DD932BB3165C287000D69D49 /* mapbox.png in Resources */,
806 DD932BB4165C287000D69D49 /* mapbox@2x.png in Resources */, 839 DD932BB4165C287000D69D49 /* mapbox@2x.png in Resources */,
807 DD932BB7165C287000D69D49 /* HeadingAngleSmall.png in Resources */, 840 DD932BB7165C287000D69D49 /* HeadingAngleSmall.png in Resources */,
  841 + DDA257071798A95600BBB325 /* Compass@2x.png in Resources */,
808 DD932BB8165C287000D69D49 /* HeadingAngleSmall@2x.png in Resources */, 842 DD932BB8165C287000D69D49 /* HeadingAngleSmall@2x.png in Resources */,
809 DD932BB9165C287000D69D49 /* LoadingTile.png in Resources */, 843 DD932BB9165C287000D69D49 /* LoadingTile.png in Resources */,
810 DD932BBA165C287000D69D49 /* LoadingTileZoom.png in Resources */, 844 DD932BBA165C287000D69D49 /* LoadingTileZoom.png in Resources */,
@@ -812,15 +846,25 @@ @@ -812,15 +846,25 @@
812 DD932BB6165C287000D69D49 /* TrackingDot@2x.png in Resources */, 846 DD932BB6165C287000D69D49 /* TrackingDot@2x.png in Resources */,
813 DD932BBB165C287000D69D49 /* TrackingDotHalo.png in Resources */, 847 DD932BBB165C287000D69D49 /* TrackingDotHalo.png in Resources */,
814 DD932BBC165C287000D69D49 /* TrackingDotHalo@2x.png in Resources */, 848 DD932BBC165C287000D69D49 /* TrackingDotHalo@2x.png in Resources */,
  849 + DDA257031798A95600BBB325 /* TrackingLocationMaskLandscape@2x.png in Resources */,
  850 + DDA257051798A95600BBB325 /* TrackingHeadingMaskLandscape@2x.png in Resources */,
  851 + DDA257061798A95600BBB325 /* TrackingHeadingMask@2x.png in Resources */,
815 DD932BBD165C287000D69D49 /* TrackingHeading.png in Resources */, 852 DD932BBD165C287000D69D49 /* TrackingHeading.png in Resources */,
  853 + DDA2570B1798A95600BBB325 /* TrackingLocationMask.png in Resources */,
816 DD932BBE165C287000D69D49 /* TrackingHeading@2x.png in Resources */, 854 DD932BBE165C287000D69D49 /* TrackingHeading@2x.png in Resources */,
  855 + DDA257091798A95600BBB325 /* TrackingHeadingMask.png in Resources */,
817 DD932BBF165C287000D69D49 /* TrackingLocation.png in Resources */, 856 DD932BBF165C287000D69D49 /* TrackingLocation.png in Resources */,
818 DD932BC0165C287000D69D49 /* TrackingLocation@2x.png in Resources */, 857 DD932BC0165C287000D69D49 /* TrackingLocation@2x.png in Resources */,
  858 + DDA2570A1798A95600BBB325 /* TrackingLocationOffMask.png in Resources */,
  859 + DDA257011798A95600BBB325 /* TrackingLocationOffMaskLandscape@2x.png in Resources */,
  860 + DDA257041798A95600BBB325 /* TrackingLocationMask@2x.png in Resources */,
  861 + DDA257081798A95600BBB325 /* Compass.png in Resources */,
819 DD94D46A16C2E064003D5739 /* HeadingAngleLarge.png in Resources */, 862 DD94D46A16C2E064003D5739 /* HeadingAngleLarge.png in Resources */,
820 DD94D46B16C2E064003D5739 /* HeadingAngleLarge@2x.png in Resources */, 863 DD94D46B16C2E064003D5739 /* HeadingAngleLarge@2x.png in Resources */,
821 DD94D46C16C2E064003D5739 /* HeadingAngleMedium.png in Resources */, 864 DD94D46C16C2E064003D5739 /* HeadingAngleMedium.png in Resources */,
822 DD94D46D16C2E064003D5739 /* HeadingAngleMedium@2x.png in Resources */, 865 DD94D46D16C2E064003D5739 /* HeadingAngleMedium@2x.png in Resources */,
823 DD280D1416EFDDD30014B549 /* examples.map-z2effxa8.json in Resources */, 866 DD280D1416EFDDD30014B549 /* examples.map-z2effxa8.json in Resources */,
  867 + DDA257021798A95600BBB325 /* TrackingLocationOffMask@2x.png in Resources */,
824 DD280D1516EFDDD30014B549 /* examples.map-zswgei2n.json in Resources */, 868 DD280D1516EFDDD30014B549 /* examples.map-zswgei2n.json in Resources */,
825 ); 869 );
826 runOnlyForDeploymentPostprocessing = 0; 870 runOnlyForDeploymentPostprocessing = 0;
@@ -23,3 +23,6 @@ @@ -23,3 +23,6 @@
23 #define WarnDeprecated() 23 #define WarnDeprecated()
24 #define NS_BLOCK_ASSERTIONS 1 24 #define NS_BLOCK_ASSERTIONS 1
25 #endif 25 #endif
  26 +
  27 +#define RMPostVersion7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
  28 +#define RMPreVersion7 ([[[UIDevice currentDevice] systemVersion] floatValue] < 7.0)