UIImage encodeWithCoder urecognised selector?

后端 未结 1 669
被撕碎了的回忆
被撕碎了的回忆 2021-01-13 23:09

I am getting this error and I have no idea how to fix it. I just added lazy loading from Apple\'s example (LazyTableImages) combined with the UIImageToDataTransformer class

相关标签:
1条回答
  • 2021-01-13 23:56

    UIImage doesn't conform to the NSCoding protocol, and (as such) doesn't implement encodeWithCoder:. You may want to convert your image to a data representation (e.g., PNG data) and encode that, instead.

    Edit: See also this answer for a workaround.

    0 讨论(0)
提交回复
热议问题