SDAutoLayout
SDAutoLayout copied to clipboard
Label 富文本
我使用的是富文本给Label 负值 。先赋值 后布局 _currentPriceLab.sd_layout .topSpaceToView(_twoNumView, 7 * heightRatio1280) .heightIs(23 * heightRatio1280) .widthIs(105 * widthRatio720) .centerXEqualToView(_twoNumView); _currentPriceLab.backgroundColor = [UIColor blueColor]; 宽度直接写的话是没有问题的 //[_currentPriceLab setSingleLineAutoResizeWithMaxWidth:115 * widthRatio720]; 如果这样写就会显示不完 出现省略号 label 明显变短
我的也是而且开启 富文本布局的参数, 你这个没开启哪个参数 你开了试试
我没有明白你的意思
_currentPriceLab.isAttributedContent = YES; 完美解决 方便后来的人看
isAttributedContent = YES 我的也不行, 就这意思😆, swift 中调用的,
确实有bug,我在有些情况因为设置了富文本,导致位置计算错误