1

I have a screen with the following design:

enter image description here

enter image description here

I want to use the same scene for both iPhone4 and iPhone5 screens; I wish to try and perform it with Auto Layouts.

The image above is the settings for the iPhone5 design.

Most of the constraints are quite simple and clear.

I have one issue that I'm not so clear how to resolve: I wish that upon 'Auto Layouting' to iPhone4, the following Objects will change as follow:

  • The Table View will reduce its Height in 40 (half the reduction required).
  • Both Image Views will reduce their Height in 40 (half the reduction required).

Is there a way to create a set of constraints that will achieve that? i.e. instructing these 3 Objects to have 2 different heights - one per each screen size - while maintaing the other constraints?

Ohad Regev
  • 5,641
  • 12
  • 60
  • 84

1 Answers1

1

First check the screen size Look at this question

Then update TableView and ImageView's height constraint constants to what you want.

Community
  • 1
  • 1
Armands.A
  • 79
  • 6
  • 1
    I'm familiar with this type of implementation. I was wondering if there's a way to do that using the IB Auto Layouts feature - which I believe Apple consider as 'the future' of designing Multi Screen Size supporting IB - and not the 'old ways'. – Ohad Regev Feb 27 '14 at 08:50
  • 1
    Haven't tried but perhaps you can achieve this by setting height constraint constants to what you want for 3.5" screen and make them greater than or equal to constant. Don't forget to stick top and bottom to next objects. – Armands.A Feb 27 '14 at 09:54