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

切换暗黑模式时, UIControl+CYLTabBarControllerExtention类中的,self.selected 会变成 yes #587

Open
986138497 opened this issue Apr 20, 2022 · 0 comments
Assignees
Labels

Comments

@986138497
Copy link

切换暗黑模式时, UIControl+CYLTabBarControllerExtention类中的,self.selected 会变成 yes
具体代码:

  • (BOOL)cyl_isSelected {
    NSUInteger tabBarSelectedIndex = self.cyl_tabBarController.selectedIndex;
    NSUInteger tabBarChildViewControllerIndex = self.cyl_tabBarChildViewControllerIndex;
    ///此时的self.selected会变成 yes,导致代码判断逻辑错误,这个self.selected 具体是干嘛用的
    BOOL isSelected = (tabBarSelectedIndex == tabBarChildViewControllerIndex) && self.selected;
    if (self.cyl_tabBarController.tabBar.cyl_hasPlusChildViewController) {
    isSelected = isSelected && CYLPlusChildViewController.cyl_plusViewControllerEverAdded;
    }
    return isSelected;
    }
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