MPMediaItemArtwork init(image:) deprecated in iOS 10.0

后端 未结 4 1015
执笔经年
执笔经年 2021-02-13 16:35

Apple has deprecated init(image:) method in MPMediaItemArtwork in iOS 10. What is the new alternative.

the class shows interface shows method

4条回答
  •  误落风尘
    2021-02-13 17:03

    I was wondering the same and ended up finding Apple's explanation for this.

    They say we shouldn't do any expensive resizing operations on the image when handler is requested, but instead simply return the closely matching image out of ones already available to you.

    The following WWDC 2017 video is where they mention it. It's about tvOS, but at least we get some insight. Starts at 07:20: https://developer.apple.com/videos/play/wwdc2017/251/?time=440

提交回复
热议问题