I have design the screen like below image
I solved this method.. set Y position of RedView, set vertical spacing of GreenView, set vertical spacing of BlueView... But this method seems inefficient.
Need help to achieve following Task.
Is there a good way?
Use Stack View Buddy .. It will make your life a lot easier ..
That will give you an idea how to use them
https://www.raywenderlich.com/114552/uistackview-tutorial-introducing-stack-views
Also go through the API Reference .. It will be helpful
https://developer.apple.com/reference/uikit/uistackview
They will automatically adjust themselves on item size changed or screen orientation changed ..