Position and size views using a stack view or Auto Layout constraints.
When you design your app’s interface, you position views and other interface elements in your app’s windows and size them appropriately. However, the size and position of those views may need to change at runtime for a few reasons:
The user resizes the window containing your views.
The user's language choice requires size changes for labels and text-based views.
NSStack objects adjust the position of their contained views automatically when interface dimensions change. Alternatively, Auto Layout constraints let you specify the rules that determine the precise size and position of the views in your interface