This commit is contained in:
2025-11-09 14:58:44 +08:00
parent 705b0f374e
commit 80b6102673
2 changed files with 21 additions and 3 deletions

View File

@@ -7,6 +7,8 @@
#import "KBCategoryTitleView.h"
#import "KBCategoryTitleCell.h"
#import <JXCategoryView/JXCategoryView.h>
#import <JXCategoryView/JXCategoryTitleCellModel.h>
@implementation KBCategoryTitleView
@@ -14,5 +16,17 @@
return [KBCategoryTitleCell class];
}
@end
// /
- (void)refreshLeftCellModel:(JXCategoryBaseCellModel *)leftCellModel
rightCellModel:(JXCategoryBaseCellModel *)rightCellModel
ratio:(CGFloat)ratio {
// super JXCategoryIndicatorView/JXCategoryTitleView
JXCategoryTitleCellModel *left = (JXCategoryTitleCellModel *)leftCellModel;
JXCategoryTitleCellModel *right = (JXCategoryTitleCellModel *)rightCellModel;
//
left.titleCurrentColor = left.isSelected ? left.titleSelectedColor : left.titleNormalColor;
right.titleCurrentColor = right.isSelected ? right.titleSelectedColor : right.titleNormalColor;
}
@end

View File

@@ -49,7 +49,8 @@ static const CGFloat JXheightForHeaderInSection = 50;
self.categoryView.delegate = self;
self.categoryView.titleSelectedColor = [UIColor colorWithHex:0x1B1F1A];
self.categoryView.titleColor = [UIColor colorWithHex:0x9F9F9F];
self.categoryView.titleColorGradientEnabled = YES;
//
self.categoryView.titleColorGradientEnabled = NO;
//
self.categoryView.titleLabelZoomEnabled = NO;
self.categoryView.contentScrollViewClickTransitionAnimationEnabled = NO;
@@ -71,12 +72,15 @@ static const CGFloat JXheightForHeaderInSection = 50;
backgroundView.indicatorColor = [UIColor whiteColor]; // keep selected fill white
backgroundView.layer.borderColor = [UIColor colorWithHex:0x02BEAC].CGColor;
backgroundView.layer.borderWidth = 1;
//
backgroundView.scrollEnabled = NO;
backgroundView.scrollAnimationDuration = 0;
self.categoryView.indicators = @[backgroundView];
_pagerView = [self preferredPagingView];
self.pagerView.mainTableView.gestureDelegate = self;
[self.view addSubview:self.pagerView];
self.pagerView.listContainerView.scrollView.scrollEnabled = false;
// self.pagerView.listContainerView.scrollView.scrollEnabled = false;
self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;