i am trying to set the maximum and minimum image of MPVolumeView but i can't get it working
here is the code
VolumeView.setVolumeThumbImage(UIImage(named: "VolumeSlider"), forState: UIControlState.Normal)
VolumeView.setMinimumVolumeSliderImage(UIImage(named: "VolumeUp"), forState: UIControlState.Normal)
VolumeView.setMaximumVolumeSliderImage(UIImage(named: "VolumeDown"), forState: UIControlState.Normal)
The code you have written is fine, however, you misunderstood what
setMaximumVolumeSliderImage achieve. These methods are for actually setting the track images of the control.
You're looking for something comparable to
MPVolumeView doesn't have such methods.
The only work around would be to position a
UIImageView either side of the volume view to show your images. The downside to this is that the route button will get in the way for the maximum value image, so you would have to set
showsRouteButton = NO; to prevent this.