44//
55
66#import < Controls/CSColorSlider.h>
7+ #import < Prefix.h>
78
89@interface CSColorSlider ()
910
@@ -60,7 +61,7 @@ - (void)baseInitWithType:(CSColorSliderType)sliderType label:(NSString *)label s
6061 [self .sliderLabel setFont: [UIFont fontWithName: @" HelveticaNeue-Light" size: 16 ]];
6162 [self .sliderLabel setText: label];
6263 [self .sliderLabel setBackgroundColor: [UIColor clearColor ]];
63- [self .sliderLabel setTextColor: [UIColor blackColor ]];
64+ [self .sliderLabel setTextColor: [UIColor respondsToSelector: @selector ( labelColor )] ? [UIColor performSelector: @selector ( labelColor )] : [UIColor blackColor ]];
6465 [self .sliderLabel setTextAlignment: NSTextAlignmentLeft];
6566 [self insertSubview: self .sliderLabel atIndex: 0 ];
6667 [self .sliderLabel setTranslatesAutoresizingMaskIntoConstraints: NO ];
@@ -73,20 +74,13 @@ - (void)baseInitWithType:(CSColorSliderType)sliderType label:(NSString *)label s
7374 [self .sliderValueLabel setFont: [UIFont fontWithName: @" HelveticaNeue-Light" size: 16 ]];
7475 [self .sliderValueLabel setText: @" 0" ];
7576 [self .sliderValueLabel setBackgroundColor: [UIColor clearColor ]];
76- [self .sliderValueLabel setTextColor: [UIColor blackColor ]];
77+ [self .sliderValueLabel setTextColor: [UIColor respondsToSelector: @selector ( labelColor )] ? [UIColor performSelector: @selector ( labelColor )] : [UIColor blackColor ]];
7778 [self .sliderValueLabel setTextAlignment: NSTextAlignmentRight];
7879 [self insertSubview: self .sliderValueLabel atIndex: 0 ];
7980 [self .sliderValueLabel setTranslatesAutoresizingMaskIntoConstraints: NO ];
8081 [self addConstraint: [NSLayoutConstraint constraintWithItem: self .sliderValueLabel attribute: NSLayoutAttributeCenterY relatedBy: NSLayoutRelationEqual toItem: self attribute: NSLayoutAttributeBottom multiplier: 0.5 constant: 0 ]];
8182 [self addConstraint: [NSLayoutConstraint constraintWithItem: self .sliderValueLabel attribute: NSLayoutAttributeRight relatedBy: NSLayoutRelationEqual toItem: self attribute: NSLayoutAttributeRight multiplier: 0.98 constant: 0 ]];
8283
83- UIBlurEffect *effect = [UIBlurEffect effectWithStyle: UIBlurEffectStyleExtraLight];
84- UIVisualEffectView *cellBackgroundBlur = [[UIVisualEffectView alloc ] initWithEffect: effect];
85- cellBackgroundBlur.frame = self.bounds ;
86- cellBackgroundBlur.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
87- cellBackgroundBlur.userInteractionEnabled = NO ;
88- [self insertSubview: cellBackgroundBlur atIndex: 0 ];
89-
9084 self.sliderType = sliderType;
9185 self.selectedColor = startColor;
9286
0 commit comments