0

I have a UIVIewController- VC_1. I have two subViews SubV_1 and SubV_2.

Frame of SubV_1 is (0,0,375,144).

I want to place SubV_2 at position (0,144,300,375), just below SubV_1.

I need to add 'Auto Layout' constraints such that when SubV_1 is resized (decrease of height), then SubV_2 is moved up automatically.

How do I do this using constraints programmatically?

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
MainakChoudhury
  • 502
  • 1
  • 7
  • 23
  • Like this http://stackoverflow.com/a/34651420/3222713 replace constant 0 by your value. – Pipiks Jan 08 '16 at 10:31
  • 1
    Possible duplicate of [Using Auto Layout in UITableView for dynamic cell layouts & variable row heights](http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights) – brnrd Jan 09 '16 at 00:32

0 Answers0