Skip to content

Commit c5fe7dc

Browse files
committed
update: filter UITextView、UIScollViewIndicator
1 parent 691a1e6 commit c5fe7dc

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

TABAnimatedDemo/TABAnimated/Product/TABAnimatedProductHelper.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,6 @@ + (void)resetData:(UIView *)view {
139139

140140
+ (BOOL)canProduct:(UIView *)view tabAnimated:(TABViewAnimated *)tabAnimated {
141141

142-
if ([view isKindOfClass:[UITextField class]] && tabAnimated.needToCreateTextFieldLayer) {
143-
return YES;
144-
}
145-
146-
if ([view.superview isKindOfClass:[UITextField class]]) {
147-
return NO;
148-
}
149-
150142
if ([view isKindOfClass:[UICollectionView class]] || [view isKindOfClass:[UITableView class]]) {
151143
// 判断view为tableview/collectionview时,若有设置骨架动画,则返回NO;否则返回YES,允许设置绘制骨架图
152144
if (view.tabAnimated) {

TABAnimatedDemo/TABAnimated/Product/TABAnimatedProductImpl.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ - (void)_recurseProductLayerWithView:(UIView *)view
392392
UIView *subV = subViews[i];
393393
if (subV.tabAnimated) continue;
394394

395+
if ([self _withoutSubViewsWithView:view tabAnimated:_controlView.tabAnimated]) continue;
396+
395397
BOOL stopRes = NO;
396398
if (subV.class == _controlView.tabAnimated.withoutSubViewsClass) {
397399
stopRes = YES;
@@ -510,12 +512,23 @@ - (void)_buttonLayerSyncProperties:(UIButton *)button layer:(TABComponentLayer *
510512

511513
#pragma mark -
512514

515+
- (BOOL)_withoutSubViewsWithView:(UIView *)view tabAnimated:(TABViewAnimated *)tabAnimated {
516+
if ([view isKindOfClass:[UITextField class]] && !tabAnimated.needToCreateTextFieldLayer) {
517+
return YES;
518+
}
519+
if ([view isKindOfClass:[UITextView class]]) {
520+
return YES;
521+
}
522+
return NO;
523+
}
524+
513525
- (BOOL)_cannotBeCreated:(UIView *)view superView:(UIView *)superView rootView:(UIView *)rootView {
514526

515527
if ([view isKindOfClass:[NSClassFromString(@"UITableViewCellContentView") class]] ||
516528
[view isKindOfClass:[NSClassFromString(@"UICollectionViewCellContentView") class]] ||
517529
[view isKindOfClass:[NSClassFromString(@"_UISystemBackgroundView") class]] ||
518-
[view isKindOfClass:[NSClassFromString(@"_UITableViewHeaderFooterViewBackground") class]]) {
530+
[view isKindOfClass:[NSClassFromString(@"_UITableViewHeaderFooterViewBackground") class]] ||
531+
[view isKindOfClass:[NSClassFromString(@"_UIScrollViewScrollIndicator") class]]) {
519532
return YES;
520533
}
521534

0 commit comments

Comments
 (0)