1

I've a table view cell with a label, text field and a stack view with two buttons in it. For the label, I've used a minimum font scale of 0.5 so that it can shrink text in iPhone SE and iPhone 5. The layout for iPhone 5s is as follows:

enter image description here

The layout works good on all phones in iOS 11 but in iOS 10 and 9, the layout is as follows for iPhone 5s only.

enter image description here

I tried the following but nothing solved the issue:

  1. Tried all alignment and distribution combinations.
  2. Reduced spacing in the stack view.
  3. Added width constraint to the first button.

I'm not sure what's going wrong here as the layout is working good for iPhone 5s and SE in iOS 11 device and simulators. Your help will be grateful.

1 Answers1

2

Assign the leading-trailing-top-bottom constraints to main stack view with label, text-field, button1, button2.

Set Horizontal Compression Resistance property of label to 248.

Set Horizontal Hugging Priority property of text-field to 248.

enter image description here

Ankit Jayaswal
  • 5,549
  • 3
  • 16
  • 36