File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 53
53
@property (assign , nonatomic ) BOOL lowerHandleHidden;
54
54
@property (assign , nonatomic ) BOOL upperHandleHidden;
55
55
56
+ @property (assign , nonatomic ) float lowerHandleHiddenWidth;
57
+ @property (assign , nonatomic ) float upperHandleHiddenWidth;
58
+
56
59
// Images, these should be set before the control is displayed.
57
60
// If they are not set, then the default images are used.
58
61
// eg viewDidLoad
Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ - (void) configureView
95
95
_upperMinimumValue = NAN;
96
96
_upperHandleHidden = NO ;
97
97
_lowerHandleHidden = NO ;
98
+
99
+ _lowerHandleHiddenWidth = 2 .0f ;
100
+ _upperHandleHiddenWidth = 2 .0f ;
98
101
}
99
102
100
103
// ------------------------------------------------------------------------------------------------------
@@ -413,8 +416,8 @@ - (CGRect)trackRect
413
416
retValue.size .height =self.bounds .size .height ;
414
417
}
415
418
416
- float lowerHandleWidth = _lowerHandleHidden ? 2 . 0f : _lowerHandle.frame .size .width ;
417
- float upperHandleWidth = _upperHandleHidden ? 2 . 0f : _upperHandle.frame .size .width ;
419
+ float lowerHandleWidth = _lowerHandleHidden ? _lowerHandleHiddenWidth : _lowerHandle.frame .size .width ;
420
+ float upperHandleWidth = _upperHandleHidden ? _upperHandleHiddenWidth : _upperHandle.frame .size .width ;
418
421
419
422
float xLowerValue = ((self.bounds .size .width - lowerHandleWidth) * (_lowerValue - _minimumValue) / (_maximumValue - _minimumValue))+(lowerHandleWidth/2 .0f );
420
423
float xUpperValue = ((self.bounds .size .width - upperHandleWidth) * (_upperValue - _minimumValue) / (_maximumValue - _minimumValue))+(upperHandleWidth/2 .0f );
You can’t perform that action at this time.
0 commit comments