1.
Https://github.com/SnapKit/Masonry
2. Use
Configuration of the 2.1 masonry
Only need to introduce the header file Masonry.h can be used;
Common methods of 2.2 masonry
Create a new constraint
[View mas_makeconstraints:^ (Masconstraintmaker *make) {}];
If a constraint is already in the past, the new constraint is updated, and if there is no constraint, the constraint is added
[View mas_updateconstraints:^ (Masconstraintmaker *make) {}];
Remove all previous constraints, add new constraints
[View mas_remakeconstraints:^ (Masconstraintmaker *make) {}];
2.3 Common property settings and usage examples
Make.top.equalTo (self.view.mas_top). offset (+); Top 20 from the bottom of its parent view
Make.left.equalTo (self.view.mas_left). Offset (0); Left border from parent view 0
Make.width.mas_equalTo (+); Set width
Make.top.equalTo (view2.mas_top); setting is equal to the top of the View2
Make.center.equalTo (self.view); Set equal to the center of the parent view
Use of third-party framework masonry to implement layouts