Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决yylable在autolayout下自适应时设置对齐方式之后文本intrinsicContentSize计算错误的数值返回导致文本看… #478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LoveSVN
Copy link

@LoveSVN LoveSVN commented Jun 5, 2018

…不到。 用reveal查看会Lable超级长.

NSMutableAttributedString *arrt= [[NSMutableAttributedString alloc] initWithString:@"asdasdddddddddddddddddd"];
arrt.color = [UIColor redColor];
arrt.alignment = NSTextAlignmentRight;
YYTextLayout *textlayout = [YYTextLayout layoutWithContainerSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) text:arrt];
上面代码在修复前会超级长。在修复后变正常。布局起来就想uilable一样简单

…不到。 用reveal查看会Lable超级长.

NSMutableAttributedString *arrt= [[NSMutableAttributedString  alloc] initWithString:@"asdasdddddddddddddddddd"];
    arrt.color = [UIColor redColor];
    arrt.alignment = NSTextAlignmentRight;
    YYTextLayout *textlayout = [YYTextLayout layoutWithContainerSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) text:arrt];
上面代码在修复前会超级长。在修复后变正常。布局起来就想uilable一样简单
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant