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

当设置未选中和选中字体不一致且选中标签title过长显示有问题 #509

Closed
wxw962530118 opened this issue Apr 23, 2024 · 1 comment

Comments

@wxw962530118
Copy link

bug描述
当设置普通和未选中字体不一致且选中标签title过长显示有问题

版本号
1.JXCategoryView版本号:1.6.3
2.手机系统版本号:17.4
3.手机型号:iPhone15 Pro

复现步骤

  1. 使用的类是:JXCategoryTitleView
    2.具体的操作步骤:使用的官方Demo,只是把titleFont和titleSelectedFont分别设置成[UIFont systemFontOfSize:14]和[UIFont systemFontOfSize:18 weight:UIFontWeightBold]就会出现截图所示问题,看了一下源码,计算cell宽度的时候用的是titleFont而并不是titleSelectedFont

截图
Simulator Screenshot - iPhone 15 Pro - 2024-04-23 at 11 10 41

@wxw962530118 wxw962530118 changed the title 当设置普通和未选中字体不一致且选中标签title过长显示有问题 当设置未选中和选中字体不一致且选中标签title过长显示有问题 Apr 23, 2024
@pujiaxin33
Copy link
Owner

可以参考【大小缩放+Cell宽度缩放】示例,同步把cell大小也给变大。
JXCategoryTitleView *titleCategoryView = (JXCategoryTitleView *)testVC.categoryView;
titleCategoryView.titleColorGradientEnabled = YES;
titleCategoryView.titleLabelZoomEnabled = YES;
titleCategoryView.titleLabelZoomScale = 1.3;
titleCategoryView.titleLabelStrokeWidthEnabled = YES;
titleCategoryView.selectedAnimationEnabled = YES;
titleCategoryView.cellWidthZoomEnabled = YES;
titleCategoryView.cellWidthZoomScale = 1.3;

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

2 participants