Closed zltqzj closed 8 years ago
See JPSVolumeButtonHandler.m#L41-L46 for context as to why this is happening. A more appropriate way to do this would be to only change the volume once the view is ready. Since I don't know what's causing the delay in preparing that view to handle volume change notifications, I don't know how to detect when it's ready. Some investigative work will be necessary.
We could also significantly increase the delay to reduce the odds of displaying the volume HUD, but that's even more inelegant than the current approach, which is already hacky.
On iOS 9 i have the volume HUD that is displayed everytime I press the volume button. Am I doing something wrong ?
On iOS 9 i have the volume HUD that is displayed everytime I press the volume button. Am I doing something wrong ?
Nope, there's a race condition in this code. See my previous comment.
Thanks for giving us wonderful demo,I use "JPSVolumeButtonHandler" in my app, but I can not understand that when I start my application,there is a system sound icon appear in the center of screen sometimes , not every time , particularly in ios8. I want to stop it appearing.what should I do? thank you.