IPhone5 and reverse compatible apps

I know that an application developed for an iPhone older than iPhone5 works in a mailbox. But what about a reversal. The application has been updated to the iPhone5 standard. How does it work on iPhone4?

If not, when all the developers updated their applications, will the older iPhones be without apps or updates?

+4
source share
4 answers

This is more MonoTouch oriented, but the same methods apply to Obj-C:

http://redth.info/get-your-monotouch-apps-ready-for-iphone-5-ios-6-today/

Basically, the Default-568h@2x.png file tells iOS that it is a "Tall" application. For other image objects, you need to determine whether it is a tall device or not by checking the UIScreen MainScreen Bounds, and also if it is an iPhone idiom or not, and then see if the height is 1136 (check the scale value), and then select in this case image of different sizes.

Here's the C # code, but again, it is very close to Obj-C:

public static bool IsTall { get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone && UIScreen.MainScreen.Bounds.Height * UIScreen.MainScreen.Scale >= 1136; } } 
+5
source

Just add an image called Default-568h@2x.png (640x1136) to your project and, like magic, it will work! It is incredible how easy it is.

+3
source

They will need to adjust their location accordingly using AutoLayout or something similar.

+1
source

Of course they will work. If you do not encode them automatically compress or use smaller images, then it will simply be cropped from the top or bottom.

-2
source

Source: https://habr.com/ru/post/1433958/


All Articles