You can’t change the volume of the device programmatically, however, MPVolumeView (volume slider) is there to change the volume of the device, but only through interaction with the user, for example, creating your own slider and marking it with a “volume” or something like that.
MPVolumeView - , MediaPlayer.framework , MPVolumeView . MPVolumeView , . AVAudioPlayer .
, , :
musicPlayer = [[MPMusicPlayerController iPodMusicPlayer];
musicPlayer.volume = 1;
, .