修改三方库 JXCategoryIndicatorCell self.contentView.layer.cornerRadius = 4;
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user