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

QMUIButton 布局,titleLabel显示不全 #1591

Open
fanyuecheng opened this issue Oct 24, 2024 · 0 comments
Open

QMUIButton 布局,titleLabel显示不全 #1591

fanyuecheng opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@fanyuecheng
Copy link

Bug 表现
QMUIButton 布局,在一定条件下titleLabel显示不全
如设置了font/设置了contentEdgeInsets

截图
截屏2024-10-24 12 10 55
QMUIButton *button = [[QMUIButton alloc] qmui_initWithImage:[UIImage qmui_imageWithColor:UIColorRed size:CGSizeMake(10, 10) cornerRadius:0] title:@"沟通顺畅"];
button.spacingBetweenImageAndTitle = 5;
button.contentEdgeInsets = UIEdgeInsetsMake(0, 7.5, 0, 7.5);
button.titleLabel.font = [UIFont systemFontOfSize:10];
[button sizeToFit];
[self.view addSubview:button];
经查看 contentEdgeInsets 实际的left和right 是7.6

如何重现

预期的表现
正常情况下,应该是什么表现

其他信息

  • 设备: [例如模拟器、iPhone、iPad]
  • iOS 版本: [iOS 14.x]
  • Xcode 版本: [Xcode 12.x]
  • QMUI 版本: [4.x.x]
@MoLice MoLice added the bug label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants