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
Text Attributes 1入口,仅显示Border时
NSMutableAttributedString *one = [[NSMutableAttributedString alloc] initWithString:@"Border"]; one.yy_font = [UIFont boldSystemFontOfSize:30]; one.yy_color = [UIColor colorWithRed:1.000 green:0.029 blue:0.651 alpha:1.000]; YYTextBorder *border = [YYTextBorder borderWithLineStyle:YYTextLineStyleSingle lineWidth:1 strokeColor:[UIColor colorWithRed:1.000 green:0.029 blue:0.651 alpha:1.000]]; border.cornerRadius = 3; border.insets = UIEdgeInsetsMake(-4, -4, -4, -4); one.yy_textBackgroundBorder = border; YYLabel *label = [YYLabel new]; label.attributedText = one; label.width = self.view.width; label.height = self.view.height - (kiOS7Later ? 64 : 44); label.top = (kiOS7Later ? 64 : 0); label.textAlignment = NSTextAlignmentCenter; label.textVerticalAlignment = YYTextVerticalAlignmentCenter; label.numberOfLines = 0; label.backgroundColor = [UIColor colorWithWhite:0.933 alpha:1.000]; [self.view addSubview:label];
The text was updated successfully, but these errors were encountered:
border 超过了视图边界,所以被裁剪掉了。这需要把 Label 视图调高一些,为 border 提供足够的空间。
Sorry, something went wrong.
@ibireme Label已经是全屏幕了,应该怎么调呢?这个就是你Demon中的例子
label.textContainerInset = UIEdgeInsetsMake(5, 5, 5, 5);
@ibireme 非常感谢!
No branches or pull requests
Text Attributes 1入口,仅显示Border时
The text was updated successfully, but these errors were encountered: