0

I found a easy way to adaptive iPhone4/4s,5,6,6P size.

  1. Delete LaunchScreen.xib in ProjectTagets->App Icons andLaunch Images Delete LaunchScreen.xib

  2. Add Default images (iPhone4/4s,5)size

After that i can adaptive all iPhone size ever i have not use autolayout .

Question:

  1. Why i can adptive it ever i have not use autolayout ?

  2. What harm is there in this way ?

  3. which is the best way to adaptive all iPhone Size ?

Allan
  • 2,086
  • 1
  • 18
  • 39
  • 2
    Note a question does not start with "Pls tell me" (Pls is not a word anyway). A question would be phrased like "Is there any harm in doing it this way?". – Fogmeister Dec 16 '14 at 08:46
  • this has nothing to do with auto layout. I suggest you to edit the title. You should title it `launch screen xib` – wcd Dec 16 '14 at 09:37

1 Answers1

1
  1. AutoLayout is a layout engine, it has nothing to do with resolution of the device. When iOS launches your app, it will check if the app has the launch image targeted on a specific device(prior to iOS 8) or a launch screen xib file (iOS 8). If it finds it, then iOS will run your app in native resolution of current device.

  2. Because the launch screen xib uses size class, so you can use only one launch screen xib to adopt all different resolution devices. But since launch screen only works in iOS 8, if you use it to support different resolution, you have to be sure you only support iOS 8. If you want to support older iOS versions you can not use launch screen xib.

  3. If you only want your app to run on iOS 8 devices, it's fine to use launch screen xib. But if that's not the case, you should use the old launch images.

see this question:

How to support various iphone screen sizes as of 2014?

and this

iPhone 6 Plus resolution confusion: Xcode or Apple's website? for development

Community
  • 1
  • 1
wcd
  • 1,144
  • 8
  • 15