masonry+superview
pod 'masonry+superview'
or
pod 'Masonry+ToSuperView'
[view mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalToSuperview(); }];
//Masonry相对于父视图的约束
@interface MASConstraint (SuperView)
//相对于父视图的约束 block equal
- (MASConstraint *(^)(void))mas_equalToSuperview;
- (MASConstraint *(^)(void))equalToSuperview;
//相对于父视图的约束 block greaterThanOrEqual
- (MASConstraint *(^)(void))mas_greaterThanOrEqualToSuperview;
- (MASConstraint *(^)(void))greaterThanOrEqualToSuperview;
//相对于父视图的约束 block lessThanOrEqual
- (MASConstraint *(^)(void))mas_lessThanOrEqualToSuperview;
- (MASConstraint *(^)(void))lessThanOrEqualToSuperview;
@end
Pod不支持修改大小写。。。masonry+superview无法改成 Masonry+Superview 可以使用masonry+superview或者Masonry+ToSuperView