Browse Source

样式修改

Steven 2 months ago
parent
commit
d4fa633b1c

+ 7 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.m

@@ -116,6 +116,10 @@
     self.categoryView.titleSelectedColor = HexRGB(0x333333);
     self.categoryView.titleColor = HexRGB(0x666666);
     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;
     
     JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
     lineView.indicatorColor = THEMECOLOR;
@@ -223,19 +227,19 @@
         if (rate == 1) {
             self.bgImageView.hidden = YES;
             self.categoryView.backgroundColor = [UIColor whiteColor];
-            [self changeSortViewColor:[UIColor whiteColor]];
+//            [self changeSortViewColor:[UIColor whiteColor]];
         }
         else {
             self.bgImageView.hidden = NO;
             self.categoryView.backgroundColor = [UIColor clearColor];
-            [self changeSortViewColor:[UIColor clearColor]];
+//            [self changeSortViewColor:[UIColor clearColor]];
         }
     }
     else {
         self.navView.backgroundColor = [UIColor clearColor];
         self.bgImageView.hidden = NO;
         self.categoryView.backgroundColor = [UIColor clearColor];
-        [self changeSortViewColor:[UIColor clearColor]];
+//        [self changeSortViewColor:[UIColor clearColor]];
     }
 }
 

+ 27 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/Controller/GroupCourseGroupViewController.m

@@ -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];

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.m

@@ -40,7 +40,6 @@
 - (void)configWithSource:(GroupCourseGroupInfoModel *)model {
     [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
-//    self.orderUser.text = [NSString stringWithFormat:@"剩余%.0f个名额", model.maxStudentNum - model.studentCount];
     self.orderUser.text = [NSString stringWithFormat:@"%.0f人学习",model.studentCount];
     // time
     NSDateFormatter *formatter = [NSObject getDateformatter];

+ 0 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.xib

@@ -21,11 +21,6 @@
                             <constraints>
                                 <constraint firstAttribute="width" secondItem="aHt-s4-D8T" secondAttribute="height" multiplier="16:9" id="CuK-sb-2aR"/>
                             </constraints>
-                            <userDefinedRuntimeAttributes>
-                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                    <real key="value" value="6"/>
-                                </userDefinedRuntimeAttribute>
-                            </userDefinedRuntimeAttributes>
                         </imageView>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0p4-wR-LI6">
                             <rect key="frame" x="8" y="8" width="12" height="19"/>