New image name for iPhone 5

前端 未结 6 1280
日久生厌
日久生厌 2020-12-08 02:21

With the retina we make images with the @2x in the name. I see where the default image has to be default-568h@2x but this does not seem to be the case for other images. Like

6条回答
  •  半阙折子戏
    2020-12-08 03:07

    To complete Jason's answser, I would propose: What about overriding the UIImage's imageNamed: method to have it happen the "-568" suffix to the name of your image? Or add a new method called resolutionAdaptedImageNamed: to the UIImage maybe using a category.

    If I have a bit of time in the next days, I will try to post the code for that.

    Caution: will not work for images in the Nib files.

提交回复
热议问题