We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如果高度限制, 会有半行的情况出现 代码如下, 可以直接粘贴运行
TYAttributedLabel *label2 = [[TYAttributedLabel alloc]init]; label2.backgroundColor = [UIColor lightGrayColor]; label2.frame = CGRectMake(0, 100+10, CGRectGetWidth(self.view.frame), 60); [self.view addSubview:label2]; // 追加(添加到最后)文本 [label2 appendText:@"\t任何值得去的地方任何值得去的地方任何值得去的地方任何值得去的地方任何值得去的地方"]; [label2 appendImageWithName:@"haha" size:CGSizeMake(15, 15)]; [label2 appendText:@",都没“有捷径“"]; [label2 appendImageWithName:@"haha" size:CGSizeMake(15, 15)]; [label2 appendText:@"\t任何值得等待的人,都会迟来一些;所以,不要怕,不要担心\n"]; [label2 appendText:@"\t任何值得追逐的梦想,都必须在一路艰辛中备受嘲笑。\n"]; [label2 appendText:@"\t所以,不要怕,不要担心你所追逐的有可能是错的。\n"]; [label2 appendText:@"\t因为,不被嘲笑的梦想不是梦想。\n"];
如图所示
请问怎么能显示正确, 不显示半行
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如果高度限制, 会有半行的情况出现
代码如下, 可以直接粘贴运行
如图所示
请问怎么能显示正确, 不显示半行
The text was updated successfully, but these errors were encountered: