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
|
||||
|
||||
Reference in New Issue
Block a user