diff --git a/keyBoard/Class/Shop/V/KBCategoryTitleCell.m b/keyBoard/Class/Shop/V/KBCategoryTitleCell.m index 3b31edd..451e9ff 100644 --- a/keyBoard/Class/Shop/V/KBCategoryTitleCell.m +++ b/keyBoard/Class/Shop/V/KBCategoryTitleCell.m @@ -27,7 +27,7 @@ - (void)layoutSubviews { [super layoutSubviews]; // 固定圆角块高度 20pt,使之更接近设计稿 - CGFloat pillHeight = 20.0; + CGFloat pillHeight = 30.0; CGFloat vPadding = MAX(0.0, (self.contentView.bounds.size.height - pillHeight)/2.0); CGRect frame = CGRectInset(self.contentView.bounds, 0, vPadding); self.kb_pillBackgroundView.frame = frame; diff --git a/keyBoard/Class/Shop/VC/KBShopVC.m b/keyBoard/Class/Shop/VC/KBShopVC.m index 7af20ca..655f798 100644 --- a/keyBoard/Class/Shop/VC/KBShopVC.m +++ b/keyBoard/Class/Shop/VC/KBShopVC.m @@ -34,15 +34,32 @@ static const CGFloat JXheightForHeaderInSection = 50; - (void)viewDidLoad { [super viewDidLoad]; +// [self setupUI]; + +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + + [self.navigationController setNavigationBarHidden:YES animated:YES]; +} + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + + [self.navigationController setNavigationBarHidden:NO animated:NO]; +} + +- (void)setupUI{ + self.automaticallyAdjustsScrollViewInsets = NO; self.view.backgroundColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = false; self.edgesForExtendedLayout = UIRectEdgeNone; - _titles = @[@"能力", @"爱好", @"队友",@"能力2", @"爱好2", @"队友2"]; + _titles = @[@"能力", @"爱好", @"队友",@"能力2", @"爱好2", @"队友2",@"能力", @"爱好", @"队友",@"能力2", @"爱好2", @"队友2"]; _userHeaderView = [[KBShopHeadView alloc] init]; - _categoryView = (JXCategoryTitleView *)[[KBCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, JXheightForHeaderInSection)]; self.categoryView.titles = self.titles; self.categoryView.backgroundColor = [UIColor whiteColor]; @@ -67,7 +84,7 @@ static const CGFloat JXheightForHeaderInSection = 50; self.categoryView.averageCellSpacingEnabled = NO; JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init]; - backgroundView.indicatorHeight = 20; + backgroundView.indicatorHeight = 30; backgroundView.indicatorCornerRadius = JXCategoryViewAutomaticDimension; backgroundView.indicatorColor = [UIColor whiteColor]; // keep selected fill white backgroundView.layer.borderColor = [UIColor colorWithHex:0x02BEAC].CGColor; @@ -114,18 +131,6 @@ static const CGFloat JXheightForHeaderInSection = 50; [self.naviBGView addSubview:naviTitleLabel]; } -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [self.navigationController setNavigationBarHidden:YES animated:YES]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - [self.navigationController setNavigationBarHidden:NO animated:NO]; -} - - (JXPagerView *)preferredPagingView { return [[JXPagerView alloc] initWithDelegate:self]; }