Conditionally allowing showCompass view property

Summary:
Only allow the showsCompass view property when iOS 9+ is used.  Fixes #5706.
Closes https://github.com/facebook/react-native/pull/5708

Reviewed By: svcscm

Differential Revision: D2896322

Pulled By: nicklockwood

fb-gh-sync-id: 16b789d3516ad1ff7189d6ceab4300039ce2a76b
This commit is contained in:
Ian Cervantez 2016-02-03 11:35:53 -08:00 committed by facebook-github-bot-7
parent db74e713fe
commit 98373ac6e3
1 changed files with 13 additions and 0 deletions

View File

@ -209,4 +209,17 @@ const CGFloat RCTMapZoomBoundBuffer = 0.01;
self.overlayIDs = newOverlayIDs;
}
- (BOOL)showsCompass {
if ([MKMapView instancesRespondToSelector:@selector(showsCompass)]) {
return super. showsCompass;
}
return NO;
}
- (void)setShowsCompass:(BOOL)showsCompass {
if ([MKMapView instancesRespondToSelector:@selector(setShowsCompass:)]) {
super.showsCompass = showsCompass;
}
}
@end