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高度,无法使用UITableViewAutomaticDimension #181

Closed wzi90921 closed 7 years ago

wzi90921 commented 7 years ago

场景:tableview 有多种cell,有的使用xib-autolayout布局,有的使用sdautolayout布局; xib-autolayout布局 使用 self.tableView.rowHeight = UITableViewAutomaticDimension; self.tableView.estimatedRowHeight = 44; 但是sdautolayout布局的cell,无法正常显示; 如果使用sdautolayout提供的计算cell高度的方法,xib-autolayout布局布局的cell 也无法正常显示。 是否有什么方式可以兼容此两种布局的cell呢

gsdios commented 7 years ago

sd是自己实现的自动布局算法通过修改frame实现自动布局不可和系统约束混用