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

当UILabel使用html标记的属性文本时,改变文本的字体大小,高度无法自适应??? #70

Closed qimuya3 closed 8 years ago

qimuya3 commented 8 years ago

问题代码片段: _cookMethod.sd_layout .topSpaceToView(_cmImage, 2) .rightSpaceToView(wc, 10) .leftEqualToView(_cmImage) .autoHeightRatio(0);

NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[model.cookMenuDetail.message dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType,NSFontAttributeName : [UIFont boldSystemFontOfSize:18] } documentAttributes:nil error:nil];

_cookMethod.font = [UIFont systemFontOfSize:17]; _cookMethod.attributedText = attrStr; 即使设置了_cookMethod.isAttributedContent = YES;

iCoobin commented 8 years ago

我也遇到这个问题,你有解决办法了吗?

gsdios commented 8 years ago

可以加入SDAutoLayout qq交流群(497140713)交流下

maker997 commented 6 years ago

请问这个问题解决了吗

qimuya3 commented 6 years ago

我自己解决了

hjm 邮箱:qimuya3@163.com

Signature is customized by Netease Mail Master

在2018年07月03日 13:11,maker997 写道:

请问这个问题解决了吗

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.