Automatic resizing for 'non-retina' image versions

前端 未结 9 1624
生来不讨喜
生来不讨喜 2021-01-30 15:03

I\'m looking for a solution that can save me from maintaining two versions of the same image, one for Retina displays (aka @2x), one another for non-Retina displays. My goal is

9条回答
  •  不要未来只要你来
    2021-01-30 15:35

    Or what you can also do is: Have only the @2x images in your app's bundle then on the first launch. Take all the @2x photos and downsize them by 1/2 and store them in the documents directory. Then when you need your photos for a UIImageView say, just grab them for the documents directory and set it to your UIImageView using code and not Interface Builder!

    I was wondering this a few weeks ago too and I realized that this is pretty much the only way to really do what you are looking for!

提交回复
热议问题