How to customize MPVolumeView in iOS?
-
30-04-2021 - |
Question
I need to make a custom thumb for my volume slider, which I need it to be a MPVolumeView. Is there any way I can change it?
Solution
Update: note that in iOS 6, there are built-in methods for customizing the MPVolumeView slider, similar to the methods for UISlider:
- (void)setVolumeThumbImage:(UIImage *)image forState:(UIControlState)state
- (void)setMaximumVolumeSliderImage:(UIImage *)image forState:(UIControlState)state
- (void)setMinimumVolumeSliderImage:(UIImage *)image forState:(UIControlState)state
OTHER TIPS
You can't. You can only customize UISLider:
[slider setThumbImage:[UIImage imageNamed:@"sliderThumb.png"] forState:UIControlStateNormal];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow