MPMediaItemPropertyArtwork
全部标签 运行“额外循环”之前的分配代码://loadingitemstothearray,therearenomemorywarningsafterthisiscompleted.Thefirstallocationsscreenshotisafterthiscodeandbeforeextraloopcode.NSMutableArray*albumCovers=[[NSMutableArrayalloc]init];for(MPMediaQuery*queryinqueries){NSArray*allCollections=[querycollections];for(MPMediaIt
在使用iOS8.4播放AppleMusic中的歌曲时,我无法检索MPMediaItemPropertyArtwork我尝试读取nowPlayingItem的图像(lldb)po[[[MPMusicPlayerControllersystemMusicPlayer]nowPlayingItem]valueForProperty:MPMediaItemPropertyArtwork]但是返回的对象是空的:(lldb)p(CGRect)[[[[MPMusicPlayerControllersystemMusicPlayer]nowPlayingItem]valueForProperty:MP
此代码工作正常:funcsetInfoCenterCredentials(_artist:String,_title:String,_image:UIImage){letmpic=MPNowPlayingInfoCenter.default()letalbumArt=MPMediaItemArtwork(image:image)mpic.nowPlayingInfo=[MPMediaItemPropertyTitle:title,MPMediaItemPropertyArtist:artist,MPMediaItemPropertyArtwork:albumArt]}但是Xcode提示