I know you cannot control device volume from within your application, but I would like the device volume to be able to affect the UIScrollBar I have in my application to control volume.
I know this is possible because the Last.fm application does it, I would like to implement this behaviour.
I can find very little information on the interwebs. Anyone here can help me maybe? :)
On an iPhone with Face ID: Simultaneously press and then release the side button and volume up button. On an iPhone with a Home button: Simultaneously press and then release the Home button and side button.
Press the Side button and the Home button at the same time. Quickly release both buttons. After you take a screenshot, a thumbnail appears temporarily in the bottom left-hand corner of your screen. Tap the thumbnail to open it or swipe left to dismiss it.
1) Go to Settings → General → Home Button on your iPhone. 2) You'll see the same “Choose Your Click” assistant like in the iOS setup assistant. Again, you get to choose between three degrees of “clickeness” for the Home button— Light (1), Medium (2) and Heavy (3).
It's easy with a listener callback
void audioVolumeChangeListenerCallback (void *inUserData, AudioSessionPropertyID inID, UInt32 inDataSize, const void *inData)
{
RootViewController *controller = (RootViewController *) inUserData;
Float32 newGain = *(Float32 *)inData;
[controller setGainManual:newGain];
}
which gets initialized in my view controller's viewDidLoad like this
AudioSessionAddPropertyListener (kAudioSessionProperty_CurrentHardwareOutputVolume ,audioVolumeChangeListenerCallback, self );
This is all SDK/App Store friendly too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With