musicPlayer = [[MPMusicPlayerController iPodMusicPlayer];
currentVolume = musicPlayer.volume;
This is now deprecated as of iOS8.0 so try the following
#import <AVFoundation/AVAudioSession.h>
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
CGFloat volume = audioSession.outputVolume;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…