mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
added method to set thumb image
Summary: this change will allow the slider to have different thumb images . Sets an image for the thumb. It only supports static images Closes https://github.com/facebook/react-native/pull/3849 Reviewed By: svcscm Differential Revision: D2665699 Pulled By: nicklockwood fb-gh-sync-id: 3a767e43170074e2419067d5c8eae61668ebb5e9
This commit is contained in:
committed by
facebook-github-bot-4
parent
b5be05d82b
commit
9fc3991615
@@ -20,5 +20,7 @@
|
||||
@property (nonatomic, assign) float lastValue;
|
||||
|
||||
@property (nonatomic, strong) UIImage *trackImage;
|
||||
@property (nonatomic, strong) UIImage *thumbImage;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -47,4 +47,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setThumbImage:(UIImage *)thumbImage
|
||||
{
|
||||
[self setThumbImage:thumbImage forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (UIImage *)thumbImage
|
||||
{
|
||||
return [self thumbImageForState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -83,6 +83,7 @@ RCT_EXPORT_VIEW_PROPERTY(minimumTrackTintColor, UIColor);
|
||||
RCT_EXPORT_VIEW_PROPERTY(maximumTrackTintColor, UIColor);
|
||||
RCT_EXPORT_VIEW_PROPERTY(onValueChange, RCTBubblingEventBlock);
|
||||
RCT_EXPORT_VIEW_PROPERTY(onSlidingComplete, RCTBubblingEventBlock);
|
||||
RCT_EXPORT_VIEW_PROPERTY(thumbImage, UIImage);
|
||||
RCT_CUSTOM_VIEW_PROPERTY(disabled, BOOL, RCTSlider)
|
||||
{
|
||||
if (json) {
|
||||
|
||||
Reference in New Issue
Block a user