From 22ca68ae2bd93d65b99d540c0dcb775ed5f65dd4 Mon Sep 17 00:00:00 2001 From: Johann Fradj Date: Mon, 31 Aug 2015 16:17:28 +0200 Subject: [PATCH] Make it look like any UIKit disabled control --- NMRangeSlider/NMRangeSlider.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NMRangeSlider/NMRangeSlider.m b/NMRangeSlider/NMRangeSlider.m index b320cf1..523bc70 100755 --- a/NMRangeSlider/NMRangeSlider.m +++ b/NMRangeSlider/NMRangeSlider.m @@ -115,6 +115,14 @@ - (void) observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(N } } +- (void)setEnabled:(BOOL)enabled +{ + [super setEnabled:enabled]; + + self.alpha = enabled ? 1.0 : 0.5; +} + + // ------------------------------------------------------------------------------------------------------ #pragma mark -