Menu

Retina display & Hires Icons

Diego
2014-03-16
2014-03-18
  • Diego

    Diego - 2014-03-16

    Hello:

    How do you manage the icon resolutions for Retina and not-retina devices?

    As you know, in xcode, you usually set two groups of icons. One for non-retina devices and the other for retina ones. So you have two files for each icon in the app:

    Settings.png and Settings@2x.png
    

    How do you do that using DPF components? I guess you are doing that programatically detecting if it is a retina device. How do you detect that ? I know that with the GetPlattform in the DPF.iOS.Common you can find the device type, but I suppose there is a better - and generic - way to know it.

    In xcode, you can achieve this by using this sentence:

    ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] &&
    ([UIScreen mainScreen].scale == 2.0))
    

    Do you happen to know if the object mainScreen is available also in DPF components?

    It would be great if in a future, the components could detect automatically if a device is a retina one, and if so, search the @2x version of the icons for the tab bars or buttons and load them automatically if they exist.

    Anyways, at the moment I would be happy with a simple "retina detection" system!

    Any clue?

     

    Last edit: Diego 2014-03-16
  • Diego

    Diego - 2014-03-18

    Nevermind. Seems to be something related with the OS, so even with DPF components, if you have a picture with the @2x and you have a retina device, the image will be automatically set to that high resolution file with no code.

     

    Last edit: Diego 2014-03-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.