The display is normal on the long screen

When the screen is small, the bottom control is sent to the screen

Solution:

Is adjusted for:

Is adjusted for:

Is adjusted for:

The principle is: after the screen size changes, so that all controls are displayed on the screen, it is necessary to dynamically adjust the spacing of two controls, then add two constraints between the two controls vertical spacing constraint, one is the minimum spacing accepted, the other is the spacing of screen controls when they are sufficient **; And the spacing priority should be lower when the screen is plentiful; And the minimum spacing should be such that all vertical constraints between controls do not conflict.

During a small screen dynamic adjustment * * group of distance between two controls more, need to give each group two controls the time distance set different priorities, so overall height can’t meet all controls on the screen between the vertical constraints, break the least priority priority constraints, a set of controls to reduce the distance between them, until the minimum distance; * * if arrive after the group controls the minimum spacing, still can’t satisfy the constraints that continues to break another set of low priority control constraints, adjust to minimum distance, so, continue to adjust until the screen highly satisfy the constraint conditions between all controls, if still can’t solve constraint conflict, the xib complains, need to continue to look for a group of controls that can be adjusted spacing, Add two constraints to it.