ChenYilong / CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
MIT License
6.9k stars 1.45k forks source link

[bug]:后台返回app字体变成”...“,小红点有文字时不会跳动。 #583

Open sonwa opened 2 years ago

sonwa commented 2 years ago



Base Info for this issue

  1. Version:Latest Version as here
  2. Language of App :Objective-C/Swift
  3. iOS System Version:iOS12
  4. Prototype(是否是真机):YES
  5. Issue Type:Crash、Bug、Enhancement(希望能支持一个新需求)、Q-A

1. How to reproduce the problem.

2. Please help me in this way.

3. Here is a Demo.

4. Here is my Debug log


使用版本:依赖Lottie库,1.29.2 // set the text color for unselected state // 普通状态下的文字属性 NSMutableDictionary *normalAttrs = [NSMutableDictionary dictionary]; normalAttrs[NSForegroundColorAttributeName] = [UIColor cyl_systemGrayColor]; normalAttrs[NSFontAttributeName] = [UIFont fontWithName:@"Helvetica Neue" size:12.0f]; // set the text color for selected state // 选中状态下的文字属性 NSMutableDictionary *selectedAttrs = [NSMutableDictionary dictionary]; selectedAttrs[NSForegroundColorAttributeName] = [UIColor colorWithRed:0/255.0 green:101/255.0 blue:242/255.0 alpha:1.0]; selectedAttrs[NSFontAttributeName] = [UIFont fontWithName:@"Helvetica Neue" size:12.0f]; selectedAttrs[NSFontAttributeName]加入自定义字体大小后,app切换到后台或切换操作其它app后,重新回到app,字体变成”...“和小红点加了文字的CYLBadgeAnimationTypeBounce和CYLBadgeAnimationTypeShake方法不会动。 ![Simulator Screen Shot - iPhone 13 Pro Max - 2022-01-14 at 18 41 55](https://user-images.githubusercontent.com/1425134/149502730-49889fe0-d7cc-48cc-bf4b-3bff9b5e99ed.png)

sonwa commented 2 years ago

还有iOS12 [tabBar setTitlePositionAdjustment:UIOffsetMake(0, -4)]; 设置文字位置无效。

1knight520 commented 2 years ago

从后台或者其他APP返回来后 tabbar上的文字我也会变"..."