美文网首页
iOS Mansory

iOS Mansory

作者: longMountain | 来源:发表于2018-11-30 11:10 被阅读5次
边距控制
UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
 make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler
 make.left.equalTo(superview.mas_left).with.offset(padding.left);
 make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom);
 make.right.equalTo(superview.mas_right).with.offset(-padding.right);
// or 
make.edges.equalTo(superview).with.insets(padding);
}];

相关文章

网友评论

      本文标题:iOS Mansory

      本文链接:https://www.haomeiwen.com/subject/zficcqtx.html