V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
holonunu
V2EX  ›  iDev

iPod 媒体库中歌曲封面如何序列化

  •  
  •   holonunu · Jul 2, 2018 · 6501 views
    This topic created in 2865 days ago, the information mentioned may be changed or developed.

    封面在 MPMediaItem.artwork 里

    1.没找到通过 MPMediaItem.persistentID 获取封面的方法

    2.artwork 没法做序列化

    3.由 artwork 生成的 UIImage,如果序列化太大了,假如有上千首歌的情况

    目前想到的解决方案: artwork 生成的 image 写入文件,文件名为 MPMediaItem.persistentID,用的时候读取文件。

    有没有其他办法呢?

    2 replies    2018-07-03 09:57:19 +08:00
    free9fw
        1
    free9fw  
       Jul 3, 2018
    artwork 生成 UIImage, 然后缓存即可,注意尺寸
    holonunu
        2
    holonunu  
    OP
       Jul 3, 2018
    @free9fw 你说得是保存图片吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1040 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:42 · PVG 02:42 · LAX 11:42 · JFK 14:42
    ♥ Do have faith in what you're doing.