美文网首页
SDAutoLayout 和 Masonry

SDAutoLayout 和 Masonry

作者: 哈布福禄克 | 来源:发表于2019-09-26 18:14 被阅读0次

Masonry和SDAutoLayout最大的不同就是上面所说一个基于对frame的设置,一个是基于NSLayoutConstraint.

UIView*view1=UIView.new;

view1.backgroundColor=[UIColor greenColor];

[self.view addSubview:view1];

view1.sd_layout.rightSpaceToView(superView,20).topSpaceToView(superView,100).widthIs(100).heightIs(100);

相关文章

网友评论

      本文标题:SDAutoLayout 和 Masonry

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