在MPMusicPlayer中,如果Next Track项目完成,我想显示MPMediaPickerView .... 这怎么可能在手机上....请帮助我....
答案 0 :(得分:0)
关注MPMusicPlayerControllerNowPlayingItemDidChangeNotification
,并在selector
方法中查看playbackState
MPMusicPlaybackStateStopped
,进行其他检查(可能是nowPlayingItem
?),然后在你的观点。
NSNotificationCenter * notifications = [NSNotificationCenter defaultCenter];
[notifications addObserver:self selector:@selector (trackDidChangeWithNotification:)
name:MPMusicPlayerControllerNowPlayingItemDidChangeNotification
object:self.iPodController];
.....
-(void)handleNextTrackNotification {
if ([self.iPodController playbackState] == MPMusicPlaybackStateStopped) {
// do whatever logic checks
// present view
}
}