Now, here is something from MediaPlayer framework that we are going to use if we want in most easiest way control level of volume in our application. This is very useful if you are implementing an audio player in your app.
The best thing about this small feature is easy implementation in any class. We just import MediaPlayer framework in header of our class (#import <MediaPlayer/MPVolumeView.h>) and add this code below in method we know that is appropriate for this feature (init method).
MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:CGRectMake(0, 0, 200, 20)] autorelease]; volumeView.center = CGPointMake(150,370); [volumeView sizeToFit]; [self.view addSubview:volumeView];
This kind of volume control is connected with iPhone hardware volume buttons. You get same thing like in Music player.
And that is all.

