If you create a trivial subclass of MPVolumeView
and override volumeSliderRectForBounds:
, you can define your own alignment for the slider rect. I like to return the whole bounds, which centers the slider in the MPVolumeView
's frame
@interface KMVolumeView : MPVolumeView
@end
@implementation KMVolumeView
- (CGRect)volumeSliderRectForBounds:(CGRect)bounds
{
return bounds;
}
@end
Just use your subclass in code or in interface builder and you can then reliably position the volume view.