My iOS project consists of one single UIView or UIViewController. The controller class is called MainViewController.swift. The view controller's view has a sub-layer that I placed below:

I set the auto-layout option to keep the distance from the spy for the same size for each device:

Now I want the subview always to be on the short side of the parent view, which means that in landscape mode, the subview view is to the right of the parent view:

I checked several tutorials and other posts:
, ?
, , :