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

使用block方式算第一个cell的高有可能错误的问题 #116

Open lucky2046 opened 8 years ago

lucky2046 commented 8 years ago

在使用- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath cellClass:(Class)cellClass cellContentViewWidth:(CGFloat)width cellDataSetting:(AutoCellHeightDataSettingBlock)cellDataSetting;方式算高的情况下,第一次被调用时self.cellDataSetting = cellDataSetting;不起作用,因为此时cellAutoHeightManager还未初始化

YunsChou commented 7 years ago

我也遇到这个问题了 https://github.com/YunsChou/YsResource/blob/master/SDAutoLayout第一个cell高度显示不全.gif

keepyounger commented 7 years ago

+1