I view this as a bug in Apple's code and have reported it to them both with Bug Reports and in person, but since they insist its a feature, you might as well benefit from it.
Use the following code to change your application's volume:
[[MPMusicPlayerController applicationMusicPlayer] setVolume:newVolume];
This will only work after you have established your audio session, either by playing a sound or by setting it active as such:
[[AVAudioSession sharedInstance] setActive:YES error:NULL];
Note as that you'll need MediaPlayer.framework and AVFoundation.framework and that the volume is between 0.0 and 1.0.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…