printz

macrumors regular
Original poster
Dec 23, 2012
216
0
Is there a way to detect that the volume got changed, and call a method when so? I need to implement a custom slider that's NOT a MPVolumeView, that mirrors the system volume level.
 

xArtx

macrumors 6502a
Mar 30, 2012
764
1
You'd want to be googling some of this:
Code:
    [[NSNotificationCenter defaultCenter] addObserver:self
                                selector:@selector(handleVolumeChangedFromOutSideApp:)
                                    name:MPMusicPlayerControllerVolumeDidChangeNotification
                                  object: myPlayer];

You don't need a private API for notification of volume change,
that code is looking for presses of the volume buttons,
which is different because you can't use them for any other purpose in an App.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.