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

setupAutoSizeWithHorizontalPadding 该方法 在button格式为上面图片,下面文字的时候,有问题 #99

Open Gallon opened 8 years ago

Gallon commented 8 years ago

当button为自定义的button,上面为图片,下面为文字的时候,用这个方法自动计算宽度的时候,会有问题

zhouxubin commented 6 years ago

setupAutoSizeWithHorizontalPadding设置自适应宽度后,button的titleEdgeInsets设置失效了,去掉自适应宽度就又好了

bujieshi commented 3 years ago

如果我想要宽度自适应,这个要怎么操作呢?