修改三方库 JXCategoryIndicatorCell self.contentView.layer.cornerRadius = 4;

This commit is contained in:
2025-11-07 00:12:28 +08:00
parent 0fa3d10284
commit f0542c11c8
7 changed files with 55 additions and 12 deletions

View File

@@ -20,6 +20,8 @@
self.separatorLine = [[UIView alloc] init];
self.separatorLine.hidden = YES;
/// STTODO
self.contentView.layer.cornerRadius = 4;
[self.contentView addSubview:self.separatorLine];
}

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "get_ppd_btn@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "get_ppd_btn@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -42,6 +42,13 @@
return self;
}
- (HWBackgroundConfig *)backgroundConfig {
// return [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorSystemVisualEffect];
HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config.backgroundAlpha = 0;
return config;
}
- (UIView<HWPanModalIndicatorProtocol> *)customIndicatorView {
if (!_indicator) _indicator = [KBDirectionIndicatorView new];
return _indicator;

View File

@@ -20,10 +20,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
// self.view.backgroundColor = [UIColor yellowColor];
UIImage *bgImage = [UIImage kb_gradientImageWithColors:@[[UIColor colorWithHex:0xE8FFF1], [UIColor colorWithHex:0xD4FDFF]] size:CGSizeMake(KB_SCREEN_WIDTH, KB_SCREEN_HEIGHT) direction:KBGradientDirectionTopToBottom];
UIImageView *bgImageView = [[UIImageView alloc] init];
bgImageView.image = bgImage;
bgImageView.image = [UIImage imageNamed:@"home_bg_image"];
[self.view addSubview:bgImageView];
[bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
@@ -43,9 +41,6 @@
}
self.simplePanModalView.topInset = 100;
[self.simplePanModalView presentInView:self.view];
HWBackgroundConfig *config = [HWBackgroundConfig configWithBehavior:HWBackgroundBehaviorDefault];
config.backgroundAlpha = 0;
[self.simplePanModalView.hw_dimmedView reloadConfig:config];
}
- (void)setupMas:(CGFloat)headViewTopV{

View File

@@ -30,7 +30,10 @@
NSArray *selectedImageNames = @[@"crab_selected", @"lobster_selected", @"apple_selected", @"carrot_selected", @"grape_selected", @"watermelon_selected"];
self.myCategoryView.titles = self.titles;
// self.myCategoryView.titleColorGradientEnabled = YES;
self.myCategoryView.imageInfoArray = imageNames;
self.myCategoryView.cellBackgroundSelectedColor = [UIColor blackColor];
self.myCategoryView.cellBackgroundUnselectedColor = [UIColor colorWithHex:0xEAF8F4];
self.myCategoryView.selectedImageInfoArray = selectedImageNames;
self.myCategoryView.loadImageBlock = ^(UIImageView *imageView, id info) {
NSString *imageName = info;
@@ -40,11 +43,25 @@
self.myCategoryView.imageZoomScale = 1.3;
self.myCategoryView.averageCellSpacingEnabled = NO;
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
lineView.indicatorWidth = 20;
self.myCategoryView.indicators = @[lineView];
[self configCategoryViewWithType:JXCategoryTitleImageType_LeftImage];
self.myCategoryView.cellBackgroundColorGradientEnabled = true;
self.myCategoryView.cellWidthIncrement = 20;
// JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
// lineView.indicatorWidth = 20;
// self.myCategoryView.indicators = @[lineView];
// JXCategoryIndicatorLineView *indicatorlineView = [[JXCategoryIndicatorLineView alloc]init];
// indicatorlineView.indicatorHeight = 30;
// indicatorlineView.indicatorColor = UIColor.blackColor;
// indicatorlineView.verticalMargin = 10;
// indicatorlineView.indicatorWidthIncrement = 20;
// indicatorlineView.indicatorCornerRadius = 4;
// UIImage *bgImage = [UIImage kb_imageWithColor:[UIColor blackColor] size:CGSizeMake(30, 30)];
//// UIImage *bgImage = [UIImage imageNamed:@"get_ppd_btn"];
// UIImageView *imageV = [[UIImageView alloc]initWithImage:bgImage];
// imageV.frame = indicatorlineView.bounds;
// imageV.contentMode = UIViewContentModeScaleToFill;
// [indicatorlineView addSubview:imageV];
// self.myCategoryView.indicators = @[indicatorlineView];
// [self configCategoryViewWithType:JXCategoryTitleImageType_LeftImage];
}
- (void)viewDidLayoutSubviews {
@@ -59,7 +76,7 @@
//}
- (CGFloat)preferredCategoryViewHeight {
return 50;
return 30;
}
- (void)configCategoryViewWithType:(JXCategoryTitleImageType)imageType {