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

cell上label自适应宽度有问题 #120

Closed qyzhaojinxi closed 8 years ago

qyzhaojinxi commented 8 years ago

在cell上,通过设置setSingleLineAutoResizeWithMaxWidth设置最大宽度,然后在赋值后执行sizeToFit方法,来实现label宽度自适应。但是设置完成后出现问题。UITableView上第一条数据上label宽度自适应了,其他行数上label宽度出现问题,和第一行宽度一样,文字显示不完整。通过注释掉useCellFrameCacheWithIndexPath这个方法解决掉了,但是cell自动布局却出现错乱了,请问是怎么回事啊

qyzhaojinxi commented 8 years ago

不好意思,是我这边的问题