开发者

System volume speaker icon always appears when using MPVolumeView

开发者 https://www.devze.com 2023-03-01 07:21 出处:网络
I have sort of the reverse problem expressed her开发者_运维问答e in this S.O. question In my case, I (iPhone 4.3 GM) and a tester (iPhone 4.3.1) are seeing the behavior that when we adjust the volume

I have sort of the reverse problem expressed her开发者_运维问答e in this S.O. question

In my case, I (iPhone 4.3 GM) and a tester (iPhone 4.3.1) are seeing the behavior that when we adjust the volume with our finger on the MPVolumeView or with the physical volume switches, the speaker volume overlay is always appearing (see screenshot).

System volume speaker icon always appears when using MPVolumeView

Here is the code where I create the MPVolumeView. I think it is totally generic and standard:

    MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:volumeSlider.bounds] autorelease];
[volumeSlider addSubview:volumeView];

*volumeSlider is simply an outlet to a plain UIView that I put on in IB.

The one other thing I can think of is that in IB, the volumeView view is checked as hidden. Then I unhide it when my audio starts playing (it is an audio streaming app).

Thank you for any help!


Take UIView in xib and bind with IBOutlet MPVolumeView.

I know this post is old,but if anyone wants this answer.


If you want to suppress the overlay while using the device volume buttons, simply move the frame of the MPVolumeView off the screen. The overlay will not appear.

0

精彩评论

暂无评论...
验证码 换一张
取 消