0

I have a ScrollView in my ViewController and inside I have a vertical StackView which has 30 Labels. Each label's height is proportional (6%) to the ViewController's View.

To see all the labels in interface builder, I have to change View Controller simulation to Freeform and change its height to about 1500 which is more than what is needed to display all labels; however, label always render to 6% of the simulated height of view (1500) instead of the real height of view. This makes the labels much taller than they would be on the device.

How can I keep the labels' hight proportional to the view and still see them correctly in IB?

Kashif
  • 4,074
  • 6
  • 39
  • 82
  • "ViewController's View" is the device size? If so, you can set the labels size or the scrollView (that appears to driven the labels height) programmatically – Ricardo Mutti Nov 20 '17 at 19:57
  • I don't have a problem at run-time. It works fine. Just the IB simulation is wrong. – Kashif Nov 20 '17 at 20:05

0 Answers0