eliotfowler / EFCircularSlider

An extensible circular slider for iOS applications
http://eliotfowler.github.io/EFCircularSlider/
MIT License
998 stars 161 forks source link

Unable to change color of handle #25

Open bricknewer opened 10 years ago

bricknewer commented 10 years ago

I'm using this circular slider as a music progress bar, and would like to make the handle not visible since it indicates some possibility of user interaction. I tried to set the handleColor to a clearColor and to colorWithHue:0 saturation:0 brightness:0 alpha:0 and neither settings were responsive visually. Based on further testing, my issue is that setting the handleColor doesn't seem to have any effect. I have tested this on all handle types (including leaving type set to the default value).

azrahim4u commented 10 years ago

I think you aren't setting your handle type. Try setting your handleType before setting the handleColor.

[self.circularSlider setHandleType:EFBigCircle]; [self.circularSlider setHandleColor:[UIColor clearColor]];

The above code works fine for me.

bricknewer commented 10 years ago

I found that I was setting the color twice, which led to my issue. I noticed that when I use EFBigCircle, EFDoubleCircleWithOpenCenter, and EFDoubleCircleWithClosedCenter it decreases my circleSlider's size and I would rather not have to guess how much larger to make my slider to account for the change in size, so I just added another option to handleType called EFNoCircle which effectively is one of the semiTransparent sliders but the handle isn't drawn.