How do I turn the system volume overlay back on after using MPVolumeView?

守給你的承諾、 提交于 2019-12-03 09:17:41

This is sadly an issue with the private framework in the earlier versions of iOS.

I understand your wish to make a solution for this, but it would cause your code to manipulate the private framework, making your app unable to pass approval.

Fortunately, the version span that had this error is short, and the number of devices in circulation with these version are growing thinner by the minute.

Bipin Patel

You can increase and decrease device volume by programmatically like:

- (void)setVolume:(float)Level
{

   OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);

   if (errorMsg) {
      NSLog(@"%d", errorMsg);
   }

}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!