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

今天刚升级,sizeToFit会出问题 #74

Closed beiguancyc closed 8 years ago

beiguancyc commented 8 years ago

以前的uilabel写的很正常,先写布局self.lbnextCheckTime.sd_layout.topSpaceToView(self.lbbabyMonthAge,10).leftEqualToView(self.lbbabyName).widthIs(60).heightIs(30); 载入数据后使用sizeToFit 升级到2.0后宽度是60,sizeToFit不起作用

chadchentao commented 8 years ago

我也遇到这个问题

gsdios commented 8 years ago

label有单行文字自适应方法的,/* 设置单行文本label宽度自适应 / - (void)setSingleLineAutoResizeWithMaxWidth:(CGFloat)maxWidth;