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

用storyboard 布局,静态的tablecell怎么设置自适应高度呢? #51

Closed liu521227 closed 8 years ago

gsdios commented 8 years ago

在 cell的 aweakFromXib 中 调用 setupAutoHeightWithBottomView:bottomMargin 就可以了

liu521227 commented 8 years ago

没有创建自定义cell,我是直接在controller里面把cell拉成属性,这中情况下能自适应高度不?还是说必须要创建自定义cell

gsdios commented 8 years ago

可以

shuiliang commented 6 years ago

我也是 storyboard 的静态代码,但是我没有用到 model, 不知道 heightForRowAtIndexPath里面怎么写,请朋友指教,谢谢!