I'm using MPVolumeView to allow the user to control his preferred audio route when using my application.
The view is presented by this code:
self.volumeView = [[MPVolumeView alloc] initWithFrame:self.view.frame];
self.volumeView.showsVolumeSlider = NO;
[self.view addSubview:self.volumeView];
When the user taps the audio route button a menu appears with the available options.
The issue: The screen that shows the volume view, might need to be hidden because of various events my application handles and I would like to hide the audio route menu at the same time (if it's currently presented)
My question: Does anybody know if it's possible to manually dismiss MPVolumeView's audio route selection menu without the user having to press the cancel button?
Thanks!
on iOS 8, you can use below code which use private API