开发者

MPMediaItem - NSCoding problem with MPMediaItemArtwork

开发者 https://www.devze.com 2022-12-23 11:18 出处:网络
So MPMediaItem conforms to NSCoding, but it contains a pointer to MPMediaItemArtwork, which doesn\'t conform to NSCoding. So if I try to archive a MPMediaItem, if that item has some artwork in it, it

So MPMediaItem conforms to NSCoding, but it contains a pointer to MPMediaItemArtwork, which doesn't conform to NSCoding. So if I try to archive a MPMediaItem, if that item has some artwork in it, it will not be able to unarchive.

I tried to make a category of MPMediaItemArtwork and make it conform to NSCoding, but I can't seem to do that because we don't have access to the actual UIImage that it stores. Does anyone know of any other creative ways to get around this problem? I want to be able to archive an MPMediaItem, even if it means somehow stripping off the artwork object. Is there a way to make a category of a class to strip away c开发者_运维技巧ertain functionality (instead of just adding more, like we do with categories)? Or any other clever way to achieve this?

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消