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).
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.
精彩评论