Home:ALL Converter>Xcode 6 device specific asset catalogue

Xcode 6 device specific asset catalogue

Ask Time:2015-07-28T22:30:22         Author:JGrn84

Json Formatter

I've seen many questions similar to mine and a lot are a bit vague, but I think I've found the answer to my question, I just need to know how it translates to Swift. This is what I understand about the asset catalogue:

@1x -          standard iPhone (3G, 3GS
@2x -          iPhone 4, 4s and iPhone 6
Retina4@2x -   iPhone 5,5s
@3x -          iPhone 6

The problem that I have seen many questions about is that there is a bug in Xcode that means that when rendered, the iPhone 6 doesn't zoom to fit, so you either have to have images that fit the 6 but are too big for the 4s, or fit the 4s and look too small in the 6 because they don't render as they should. Seems there are 2 solutions, either change the way the images are rendered (see the link below) or don't support the 4s. The answer in the link below provides a way to support the 4s by changing the way the images are loaded. What I want to know is how this is translated into swift, or if 9 months on there is a better solution. If neither of these are any good, how to I go about not supporting the 4s in my app as it can still update to the latest iOS software.

xcode 6 asset catalog iphone 6 - link to the answer I need in Swift if possible

I hope this makes sense, I've been pulling my hair out trying to work this out. Thanks in advance.

Author:JGrn84,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31679327/xcode-6-device-specific-asset-catalogue
yy