更新当前歌曲名称AVPLayer Xcode

时间:2013-03-21 03:05:27

标签: iphone avplayer


     我想将当前歌曲名称更新为此图片。我不知道如何调用那个并需要显示图像。我现在正在使用AVPlayer。我想知道怎么做。

enter image description here

我试过这个,但它显示错误。 架构armv7s的未定义符号:“_ MPMediaItemPropertyTitle”,引用自: - PlayViewController.o中的[PlayViewController playPressed]

MPNowPlayingInfoCenter *infoCenter = [MPNowPlayingInfoCenter defaultCenter]; 
infoCenter.nowPlayingInfo = 
[NSDictionary dictionaryWithObjectsAndKeys:@"my title", MPMediaItemPropertyTitle,
                                           @"my artist", MPMediaItemPropertyArtist,
                                           nil];


1 个答案:

答案 0 :(得分:0)

你在这堂课中#import <MediaPlayer/MediaPlayer.h>了吗?

MediaPlayer框架是否与您的项目相关联?

相关问题