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

1.17.16 调用update selection status if needed forTabBarController 重大bug #289

Closed
OrageKK opened this issue Aug 13, 2018 · 9 comments
Closed

Comments

@OrageKK
Copy link

OrageKK commented Aug 13, 2018

Base Info for this issue

  1. Version:v1.17.16
  2. Language:Objective-C
  3. iOS System Version:iOS11.4.1
  4. Prototype(是否是真机):YES
  5. Issue Type:Crash、Bug、Enhancement(希望能支持一个新需求)、Q-A

1. How to repeat the problem.

从1.17.4 更新到1.17.16 调用下面的方法

- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
   
	[[self cyl_tabBarController] updateSelectionStatusIfNeededForTabBarController:tabBarController shouldSelectViewController:viewController];
    return YES;
    
}

这个代理方法会走两次

- (void)tabBarController:(UITabBarController *)tabBarController didSelectControl:(UIControl *)control

2. Please help me in this way.

3. Here is a Demo.

4. Here is my Debug log

@ChenYilong ChenYilong added the bug label Oct 9, 2018
@ChenYilong
Copy link
Owner

收到,是有这个问题,请问你这个代理方法中会进行什么操作吗?
帮忙贴下你在这里面写的代码,我评估下,预计下个版本能修复。

@OrageKK
Copy link
Author

OrageKK commented Oct 9, 2018

收到,是有这个问题,请问你这个代理方法中会进行什么操作吗?
帮忙贴下你在这里面写的代码,我评估下,预计下个版本能修复。

代理方法中进行了按钮点击的数据埋点和缩放动画。调用两次导致了错乱。
目前我把

[[self cyl_tabBarController] updateSelectionStatusIfNeededForTabBarController:tabBarController shouldSelectViewController:viewController];

注释掉

@yiwade00
Copy link

yiwade00 commented Nov 20, 2018

注释掉 // [[self cyl_tabBarController] updateSelectionStatusIfNeededForTabBarController:tabBarController shouldSelectViewController:viewController];
下面改下这个

if ([control cyl_isPlusButton]) {
       UIButton *button = CYLExternPlusButton;
       button.selected=YES;
       animationView = button.imageView;
   }else{
       UIButton *button = CYLExternPlusButton;
       button.selected = NO;
   }

作者不知道啥时候更新呢

@ChenYilong
Copy link
Owner

楼上做法再具体描述下?是改demo 写法么。

@ChenYilong
Copy link
Owner

ChenYilong commented Nov 28, 2018

#297

ChenYilong added a commit that referenced this issue Nov 28, 2018
ChenYilong added a commit that referenced this issue Nov 28, 2018
@ChenYilong
Copy link
Owner

fix in v1.17.22
more infomation: 8399c7b

@yiwade00
Copy link

1.17.22 咋一直更新不上呢 是我网速慢么 cocoaods update好像不行呢

@ChenYilong
Copy link
Owner

该问题已经修复,具体用法参考这里: #259

@OrageKK
Copy link
Author

OrageKK commented Jun 3, 2019

该问题已经修复,具体用法参考这里: #259

👌了解

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants