File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Fabric/Mounting/ComponentViews/Slider Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -468,3 +468,14 @@ NS_INLINE CGRect CGRectValue(NSValue *value)
468
468
}
469
469
470
470
#endif // ] TARGET_OS_OSX
471
+
472
+ //
473
+ // fabric component types
474
+ //
475
+
476
+ #if !TARGET_OS_OSX // [TODO(macOS GH#774)
477
+ #define RCTUISlider UISlider
478
+ #else
479
+ @interface RCTUISlider : NSSlider
480
+ @end
481
+ #endif // ]TODO(macOS GH#774)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ @interface RCTSliderComponentView () <RCTImageResponseDelegate>
23
23
@end
24
24
25
25
@implementation RCTSliderComponentView {
26
- UISlider *_sliderView;
26
+ RCTUISlider *_sliderView; // TODO(macOS GH#774)
27
27
float _previousValue;
28
28
29
29
UIImage *_trackImage;
@@ -48,7 +48,7 @@ - (instancetype)initWithFrame:(CGRect)frame
48
48
static const auto defaultProps = std::make_shared<const SliderProps>();
49
49
_props = defaultProps;
50
50
51
- _sliderView = [[UISlider alloc ] initWithFrame: self .bounds];
51
+ _sliderView = [[RCTUISlider alloc ] initWithFrame: self .bounds]; // TODO(macOS GH#774)
52
52
53
53
[_sliderView addTarget: self action: @selector (onChange: ) forControlEvents: UIControlEventValueChanged];
54
54
[_sliderView addTarget: self
@@ -284,17 +284,17 @@ - (void)setThumbImage:(UIImage *)thumbImage
284
284
[_sliderView setThumbImage: thumbImage forState: UIControlStateNormal];
285
285
}
286
286
287
- - (void )onChange : (UISlider *)sender
287
+ - (void )onChange : (RCTUISlider *)sender // TODO(macOS GH#774)
288
288
{
289
289
[self onChange: sender withContinuous: YES ];
290
290
}
291
291
292
- - (void )sliderTouchEnd : (UISlider *)sender
292
+ - (void )sliderTouchEnd : (RCTUISlider *)sender // TODO(macOS GH#774)
293
293
{
294
294
[self onChange: sender withContinuous: NO ];
295
295
}
296
296
297
- - (void )onChange : (UISlider *)sender withContinuous : (BOOL )continuous
297
+ - (void )onChange : (RCTUISlider *)sender withContinuous : (BOOL )continuous // TODO(macOS GH#774)
298
298
{
299
299
float value = sender.value ;
300
300
You can’t perform that action at this time.
0 commit comments