gsdios / SDAutoLayout

One line of code to implement automatic layout. 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于做最简单易用的AutoLayout库。The most easy way for autoLayout. Based on runtime.
MIT License
5.9k stars 1.28k forks source link

masonry #149

Open RtzX opened 7 years ago

RtzX commented 7 years ago

项目里面已经使用了masonry .. 现在准备导入SDAutoLayout.. 两个框架 可以共存吗?

zhoupIT commented 7 years ago

可以

RtzX commented 7 years ago

[self.pageViewCount mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.nickNameLabel.mas_top); make.right.mas_equalTo(-15); }];

_contentLabel.sd_layout
.leftSpaceToView(contentView,15)
.rightSpaceToView(contentView,15)
.topSpaceToView(_headImageView,12);

// .maxHeightIs(54); [_contentLabel setMaxNumberOfLinesToShow:3];

类似于这样 混合使用呢?

MalongGuo commented 7 years ago

对于同一个view、viewcontroller最好不要混用,不然会出各种奇怪的问题,已经踩过无数坑了。。。

SilenceLove commented 7 years ago

最好还是用你的Msonry ,别用这个. .. 过来人的建议

MalongGuo commented 7 years ago

嗯 最近看了一下源代码,用的是runtime,最后修改的layoutSubviews,各种冲突,还是乖乖地用Masonry