博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Link address :http://blog.csdn.net/diyagoanyhacker/article/details/6582806

 

MPMusicPlayerController *ipodMusicPlayer = [MPMusicPlayerController iPodMusicPlayer];
    [ipodMusicPlayer beginGeneratingPlaybackNotifications];
    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(trackTheDeviceVolume:) 
                                                 name:MPMusicPlayerControllerVolumeDidChangeNotification 
                                               object:nil];