4

When I create an MPVolumeView, what vertical dimensions should I give it for the frame/bounds?

It seems like I can give it whatever horizontal dimensions I want and it will scale properly. Is there a range of valid values for this as well?

When I try to set a UIView to be of the MPVolumeView class in Interface Builder, whenever it is drawn to the screen, it never ends up aligned vertically where I want it to be.

Senseful
  • 86,719
  • 67
  • 308
  • 465

1 Answers1

0

As far as I was able to test it, you can make the MPVolumeView as big as you want and the slider somehow stays stuck on the top, not aligned. You can subclass MPVolumeView and implement volumeSliderRectForBounds: to set the slider's frame in the volume view's bounds. See my answer here.

Community
  • 1
  • 1
kmikael
  • 4,962
  • 3
  • 32
  • 34