|
@@ -13,6 +13,7 @@
|
|
|
#import "ProgramCourseGroupBodyView.h"
|
|
|
#import "MusicRoomStudentPageView.h"
|
|
|
#import "GroupCourseGroupInfoModel.h"
|
|
|
+#import "JXCategoryIndicatorGradientLineView.h"
|
|
|
|
|
|
@interface GroupCourseGroupViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,JXPagerMainTableViewGestureDelegate>
|
|
|
|
|
@@ -104,14 +105,25 @@
|
|
|
self.categoryView.delegate = self;
|
|
|
self.categoryView.titleFont = [UIFont systemFontOfSize:16.0f];
|
|
|
self.categoryView.titleSelectedFont = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold];
|
|
|
- self.categoryView.titleSelectedColor = HexRGB(0x333333);
|
|
|
- self.categoryView.titleColor = HexRGB(0x666666);
|
|
|
+ self.categoryView.titleSelectedColor = HexRGB(0x000000);
|
|
|
+ self.categoryView.titleColor = HexRGBAlpha(0x000000, 0.4);
|
|
|
self.categoryView.titleColorGradientEnabled = YES;
|
|
|
+ self.categoryView.averageCellSpacingEnabled = NO;
|
|
|
+ self.categoryView.cellSpacing = 42.0f;
|
|
|
+ self.categoryView.contentEdgeInsetLeft = (KPortraitWidth - 174) / 2.0f;
|
|
|
+ self.categoryView.contentEdgeInsetRight = (KPortraitWidth - 174) / 2.0f;
|
|
|
+
|
|
|
+// JXCategoryIndicatorGradientLineView *lineView = [[JXCategoryIndicatorGradientLineView alloc] init];
|
|
|
+// [lineView configStartColor:HexRGB(0x2DC7AA) startPoint:CGPointMake(0.02, 1) endColor:HexRGBAlpha(0x2DC7AA, 0) endPoint:CGPointMake(1, 1)];
|
|
|
+// lineView.indicatorColor = [UIColor clearColor];
|
|
|
+// lineView.indicatorHeight = 6;
|
|
|
+// lineView.verticalMargin = 14;
|
|
|
+// self.categoryView.indicators = @[lineView];
|
|
|
|
|
|
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
|
|
|
lineView.indicatorColor = THEMECOLOR;
|
|
|
lineView.indicatorWidth = 16;
|
|
|
- lineView.indicatorHeight = 4;
|
|
|
+ lineView.indicatorHeight = 4.0f;
|
|
|
self.categoryView.indicators = @[lineView];
|
|
|
|
|
|
_pagerView = [self preferredPagingView];
|
|
@@ -213,7 +225,18 @@
|
|
|
return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidScroll:(UIScrollView *)scrollView {
|
|
|
+
|
|
|
+ NSLog(@"sscroll content offset y %f", scrollView.contentOffset.y);
|
|
|
+ CGFloat height = self.topViewHeight;
|
|
|
+ CGFloat space = scrollView.contentOffset.y;
|
|
|
+ if (space >= height) {
|
|
|
+ self.categoryView.backgroundColor = [UIColor whiteColor];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.categoryView.backgroundColor = [UIColor clearColor];
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- (void)dealloc {
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|