Is it possible to have a UIGestureRecognizer detect a vertical swipe and adjust the volume from my app.
So if the user swipes vertical up, the volume increases, and if the user swipes down, the volume decreases.
My code for playing the audio :
AppDelegate *appDelegate= (AppDelegate *)[[UIApplication sharedApplication] delegate];
if (appDelegate.countSound == 1) {
// OFF
appDelegate.backgroundMusic.volume = appDelegate.countSound;
appDelegate.countSound = 0;
}
else
{
// ON
appDelegate.backgroundMusic.volume = appDelegate.countSound;
appDelegate.countSound = 1;
}
Any code would be highly appreciated,
Cheers Joe.