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:
parent
db74e713fe
commit
98373ac6e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue