How to efficiently use Autolayut and Auto-Resizing in same target?

66 views Asked by At

I have one target. It's a login based application. Because of legacy code, I am forced to use Auto-Resizing in some View Controllers whereas I have updated newer UI using Auto-Layout.

If the Autolayout has to work on iPhone 6 and 7 (4.7"/5.5" screens) I have to add the launch images for these.

PROBLEM:

  1. All my screen that are not using auto layout gets disturbed when I add the Launch image.
  2. If I don't use the launch screen images, all the View that use auto layout are scaled up and appears slightly bigger than expected.

I do not have the luxury to update the legacy code to use auto layout.

Can someone please give me an alternative or a work around.?

1

There are 1 answers

0
matt On BEST ANSWER

If I don't use the launch screen images, all the View that use auto layout are scaled up and appears slightly bigger than expected

Correct. This is because, without the launch screen, your app is no longer compatible with devices like the iPhone 6 and 6 Plus. To compensate, the app is treated as if this were an iPhone 5 and is shown in zoomed mode.

So if you want to run at native resolution / size on iPhone 6 and later, you must have the launch screen. That being so, setting up your interface to deal with the larger size is up to you. You do not have to adopt auto layout; autoresizing still works fine. (However, using auto layout would be better.)