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

单行富文本label无法居中对齐,已经设置了label的minWidthIs,宽度并不生效 #348

Open
doubleJJJJ opened this issue Aug 3, 2021 · 2 comments

Comments

@doubleJJJJ
Copy link

布局代码如下:
label.sd_layout
.autoHeightRatio(0)
.leftSpaceToView(self.contentView, 34)
.topSpaceToView(titleLab, 35)
.rightSpaceToView(self.contentView, 34)
.minWidthIs(300);
我已经设置了minWidthIs,可是单行富文本label的宽度仍然是自适应,并且没有居中对齐,是哪里的问题呢?

@stonesun1314
Copy link

我也遇到同样问题,设置 isAttributedContent = YES,单行富文本就不居中。不设置 isAttributedContent,单行富文本居中,但是多行计算高度有问题。

@zhoumingwu
Copy link

跟yylabel 一起使用就会遇到很多问题

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

No branches or pull requests

3 participants