Skip to content

Commit

Permalink
fix bug of API named: cyl_visibleControls
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenYilong committed Apr 12, 2019
1 parent 31d0e99 commit 86d0085
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CYLTabBarController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "CYLTabBarController"
s.version = "1.22.0"
s.version = "1.22.1"
s.summary = "Highly customizable tabBar and tabBarController for iOS"
s.description = "CYLTabBarController is iPad and iPhone compatible. Supports landscape and portrait orientations and can be used inside UINavigationController."
s.homepage = "https://github.com/ChenYilong/CYLTabBarController"
Expand Down
8 changes: 7 additions & 1 deletion CYLTabBarController/UITabBar+CYLTabBarControllerExtention.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "UITabBar+CYLTabBarControllerExtention.h"
#import "UIView+CYLTabBarControllerExtention.h"
#import "UIControl+CYLTabBarControllerExtention.h"

#import "CYLTabBar.h"

@implementation UITabBar (CYLTabBarControllerExtention)
Expand All @@ -18,7 +20,11 @@ - (NSArray *)cyl_visibleControls {
}
NSMutableArray *tabBarButtonArray = [NSMutableArray arrayWithCapacity:self.subviews.count];
[self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj cyl_isTabButton] || [obj cyl_isPlusButton] ) {
BOOL canNotResponseEvent = obj.hidden || (obj.alpha <= 0.01f) || (obj.userInteractionEnabled == NO) || (!obj.superview) || obj.frame.size.width == 0 || obj.frame.size.height == 0;
if (canNotResponseEvent) {
return;
}
if (([obj cyl_isTabButton] || [obj cyl_isPlusButton] ) ) {
[tabBarButtonArray addObject:obj];
}
}];
Expand Down

0 comments on commit 86d0085

Please sign in to comment.