2
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryTitleCellModel.h>
|
||||
|
||||
static const CGFloat kKBCategoryMinTotalWidth = 56.0;
|
||||
|
||||
@implementation KBCategoryTitleView
|
||||
|
||||
- (Class)preferredCellClass {
|
||||
@@ -29,4 +31,10 @@
|
||||
right.titleCurrentColor = right.isSelected ? right.titleSelectedColor : right.titleNormalColor;
|
||||
}
|
||||
|
||||
- (CGFloat)preferredCellWidthAtIndex:(NSInteger)index {
|
||||
CGFloat width = [super preferredCellWidthAtIndex:index];
|
||||
CGFloat minPreferredWidth = MAX(0.0, kKBCategoryMinTotalWidth - self.cellWidthIncrement);
|
||||
return MAX(width, minPreferredWidth);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -109,7 +109,7 @@ static const CGFloat JXheightForHeaderInSection = 50;
|
||||
self.categoryView.cellBackgroundUnselectedColor = [UIColor colorWithHex:0xEFEFEF];
|
||||
self.categoryView.cellBackgroundSelectedColor = [UIColor whiteColor];
|
||||
self.categoryView.cellWidthIncrement = 20;
|
||||
self.categoryView.cellSpacing = 12;
|
||||
self.categoryView.cellSpacing = 12;
|
||||
self.categoryView.contentEdgeInsetLeft = 16;
|
||||
self.categoryView.contentEdgeInsetRight = 16;
|
||||
self.categoryView.averageCellSpacingEnabled = NO;
|
||||
|
||||
Reference in New Issue
Block a user