FireMonkey Retina / non-Retina auto detection

Posted by on in Blogs
FireMonkey has a new feature in XE3 to detect if your Mac OS X or iOS device has a retinal display. If it does detect your application running on a Retina device, FireMonkey will load high resolution assets automatically to take advantage of the additional pixels. For my Play My Drums app, which will be a tablet only application, I want to make sure it looks as good as it can.

Doing this with a FireMonkey TImage is extremely easy. Basically, there is a new property added to TImage called BitmapHiRes.



So, for PlayMyDrums app, I provide two sets of images that are scaled and layed out to the exact resolutions for a Retina (2048x1536) and non-Retina (1024x768) iPad. The same package gets deployed and installed on to each seperate device but at runtime FireMonkey selects the correct asset for me.\



About
Gold User, Rank: 18, Points: 191

Comments

Check out more tips and tricks in this development video: