added property to sliderIOS to be able to disable it

Summary: added a new property named 'disable' to SliderIOS
this property prevents the user from being able to slide the slider
Closes https://github.com/facebook/react-native/pull/3730

Reviewed By: svcscm

Differential Revision: D2590154

Pulled By: javache

fb-gh-sync-id: b8a9c82c1b05eb813d9b81180cb1083b3f1852ac
This commit is contained in:
Manuel Nakamurakare
2015-10-28 05:46:47 -07:00
committed by facebook-github-bot-4
parent 8185b203be
commit 7d4f5a5c47
2 changed files with 21 additions and 0 deletions

View File

@@ -54,5 +54,13 @@ RCT_EXPORT_VIEW_PROPERTY(maximumValue, float);
RCT_EXPORT_VIEW_PROPERTY(minimumTrackTintColor, UIColor);
RCT_EXPORT_VIEW_PROPERTY(maximumTrackTintColor, UIColor);
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock);
RCT_CUSTOM_VIEW_PROPERTY(disabled, BOOL, RCTSlider)
{
if (json) {
view.enabled = !([RCTConvert BOOL:json]);
} else {
view.enabled = defaultView.enabled;
}
}
@end