【发布时间】:2015-03-16 02:20:10
【问题描述】:
我有以下代码并且正在为我工作,但它目前只能显示艺术家和歌曲:
let mpic = MPNowPlayingInfoCenter.defaultCenter()
mpic.nowPlayingInfo = [MPMediaItemPropertyTitle:songs[currentAudioIndex].songName,
MPMediaItemPropertyArtist:songs[currentAudioIndex].artistName]
我也尝试使用以下代码设置图片,但它不起作用:
mpic.nowPlayingInfo = [MPMediaItemPropertyTitle:songs[currentAudioIndex].songName,
MPMediaItemPropertyArtist:songs[currentAudioIndex].artistName,
MPMediaItemPropertyArtwork:songs[currentAudioIndex].songImage]
SongImage 是 UIImage 类型。
【问题讨论】:
-
不起作用是什么意思?任何异常、错误消息?
-
没关系,谢谢
标签: swift mpnowplayinginfocenter