What is the proper frame size of an MPVolumeView control?

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

It seems I can give it any horizontal dimensions that I want, and it will scale properly. Is there a range of acceptable values ​​for this?

When I try to set the UIView in the MPVolumeView class in Interface Builder, whenever it is drawn on the screen it never vertically aligns where I want it to be.

+4
source share
1 answer

As far as I was able to verify this, you can make the MPVolumeView as large as you want, and the slider will somehow stay on top, rather than aligned. You can subclass MPVolumeView and implement volumeSliderRectForBounds: to set the slider frame to volume limits. See my answer here .

0
source

Source: https://habr.com/ru/post/1488907/


All Articles