1
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#import "JXPagerView.h"
|
||||
#import "KBShopHeadView.h"
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import "KBCategoryTitleView.h"
|
||||
#import <JXPagingView/JXPagerView.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import "KBShopItemVC.h"
|
||||
@@ -42,7 +43,7 @@ static const CGFloat JXheightForHeaderInSection = 50;
|
||||
|
||||
_userHeaderView = [[KBShopHeadView alloc] init];
|
||||
|
||||
_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, JXheightForHeaderInSection)];
|
||||
_categoryView = (JXCategoryTitleView *)[[KBCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, JXheightForHeaderInSection)];
|
||||
self.categoryView.titles = self.titles;
|
||||
self.categoryView.backgroundColor = [UIColor whiteColor];
|
||||
self.categoryView.delegate = self;
|
||||
@@ -51,10 +52,21 @@ static const CGFloat JXheightForHeaderInSection = 50;
|
||||
self.categoryView.titleColorGradientEnabled = YES;
|
||||
self.categoryView.titleLabelZoomEnabled = YES;
|
||||
self.categoryView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
// Unselected items need a rounded gray background like the screenshot.
|
||||
// JXCategoryTitleView supports cell background colors via JXCategoryIndicatorView.
|
||||
self.categoryView.cellBackgroundColorGradientEnabled = YES;
|
||||
self.categoryView.cellBackgroundUnselectedColor = [UIColor colorWithHex:0xEFEFEF];
|
||||
self.categoryView.cellBackgroundSelectedColor = [UIColor whiteColor];
|
||||
// Make the pills look compact
|
||||
self.categoryView.cellWidthIncrement = 20; // horizontal padding for each item
|
||||
self.categoryView.cellSpacing = 12; // spacing between items
|
||||
self.categoryView.contentEdgeInsetLeft = 16;
|
||||
self.categoryView.contentEdgeInsetRight = 16;
|
||||
|
||||
JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init];
|
||||
backgroundView.indicatorHeight = 20;
|
||||
backgroundView.indicatorCornerRadius = JXCategoryViewAutomaticDimension;
|
||||
backgroundView.indicatorColor = [UIColor whiteColor]; // keep selected fill white
|
||||
backgroundView.layer.borderColor = [UIColor colorWithHex:0x02BEAC].CGColor;
|
||||
backgroundView.layer.borderWidth = 1;
|
||||
self.categoryView.indicators = @[backgroundView];
|
||||
|
||||
Reference in New Issue
Block a user