Skip to content

Commit 86d0085

Browse files
committed
fix bug of API named: cyl_visibleControls
1 parent 31d0e99 commit 86d0085

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CYLTabBarController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CYLTabBarController"
3-
s.version = "1.22.0"
3+
s.version = "1.22.1"
44
s.summary = "Highly customizable tabBar and tabBarController for iOS"
55
s.description = "CYLTabBarController is iPad and iPhone compatible. Supports landscape and portrait orientations and can be used inside UINavigationController."
66
s.homepage = "https://github.com/ChenYilong/CYLTabBarController"

CYLTabBarController/UITabBar+CYLTabBarControllerExtention.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import "UITabBar+CYLTabBarControllerExtention.h"
1010
#import "UIView+CYLTabBarControllerExtention.h"
11+
#import "UIControl+CYLTabBarControllerExtention.h"
12+
1113
#import "CYLTabBar.h"
1214

1315
@implementation UITabBar (CYLTabBarControllerExtention)
@@ -18,7 +20,11 @@ - (NSArray *)cyl_visibleControls {
1820
}
1921
NSMutableArray *tabBarButtonArray = [NSMutableArray arrayWithCapacity:self.subviews.count];
2022
[self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
21-
if ([obj cyl_isTabButton] || [obj cyl_isPlusButton] ) {
23+
BOOL canNotResponseEvent = obj.hidden || (obj.alpha <= 0.01f) || (obj.userInteractionEnabled == NO) || (!obj.superview) || obj.frame.size.width == 0 || obj.frame.size.height == 0;
24+
if (canNotResponseEvent) {
25+
return;
26+
}
27+
if (([obj cyl_isTabButton] || [obj cyl_isPlusButton] ) ) {
2228
[tabBarButtonArray addObject:obj];
2329
}
2430
}];

0 commit comments

Comments
 (0)