Steven 7 月之前
父节点
当前提交
694108edd8

二进制
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Home/notice_more.imageset/notice_more@2x.png


二进制
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Home/notice_more.imageset/notice_more@3x.png


+ 10 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyCourseGroupViewController.m

@@ -45,6 +45,16 @@
     self.ks_prefersNavigationBarHidden = YES;
     [self configUI];
     self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forceScroll) name:@"UITextViewScroll" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enableScroll) name:@"UITextViewEndScroll" object:nil];
+}
+
+- (void)forceScroll {
+    self.pagerView.mainTableView.scrollEnabled = NO;
+}
+
+- (void)enableScroll {
+    self.pagerView.mainTableView.scrollEnabled = YES;
 }
 
 - (void)configUI {

+ 10 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.m

@@ -45,6 +45,16 @@
     self.ks_prefersNavigationBarHidden = YES;
     [self configUI];
     self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forceScroll) name:@"UITextViewScroll" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enableScroll) name:@"UITextViewEndScroll" object:nil];
+}
+
+- (void)forceScroll {
+    self.pagerView.mainTableView.scrollEnabled = NO;
+}
+
+- (void)enableScroll {
+    self.pagerView.mainTableView.scrollEnabled = YES;
 }
 
 - (void)configUI {

+ 11 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/Controller/VIPCourseGroupViewController.m

@@ -46,6 +46,16 @@
     self.ks_prefersNavigationBarHidden = YES;
     [self configUI];
     self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forceScroll) name:@"UITextViewScroll" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enableScroll) name:@"UITextViewEndScroll" object:nil];
+}
+
+- (void)forceScroll {
+    self.pagerView.mainTableView.scrollEnabled = NO;
+}
+
+- (void)enableScroll {
+    self.pagerView.mainTableView.scrollEnabled = YES;
 }
 
 - (void)configUI {
@@ -235,6 +245,7 @@
     return _infoView;
 }
 
+
 /*
 #pragma mark - Navigation
 

+ 8 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -861,7 +861,7 @@
         CGFloat ySpace = 0.0f;
         for (NSInteger i = 0; i < self.buttonArray.count; i++) {
             xSpace = buttonSpace / 2 + (i % BUTTON_ROWCOUNT) * (HOME_BUTTONWIDTH + buttonSpace);
-            ySpace = (i / BUTTON_ROWCOUNT) * HOME_BUTTONHEIGHT;
+            ySpace = (i / BUTTON_ROWCOUNT) * (HOME_BUTTONHEIGHT + HOME_BUTTON_VERTICAL_SPACE);
             HomeMessageModel *model = self.buttonArray[i];
             KSHomeButton *buttonView = [KSHomeButton shareInstance];
             
@@ -929,9 +929,16 @@
 - (void)refreshNotice {
     if (self.noticeTitleArray.count) {
         self.noticeView.hidden = NO;
+        CGFloat height = [PublicNoticeView getViewHeight];
+        [self.noticeView mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.height.mas_equalTo(height);
+        }];
     }
     else {
         self.noticeView.hidden = YES;
+        [self.noticeView mas_updateConstraints:^(MASConstraintMaker *make) {
+            make.height.mas_equalTo(CGFLOAT_MIN);
+        }];
     }
     self.noticeScrollView.titlesGroup = self.noticeTitleArray;
 }

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/HomeButtonView.h

@@ -7,8 +7,9 @@
 
 #import <UIKit/UIKit.h>
 
+#define HOME_BUTTON_VERTICAL_SPACE (12)
 #define HOME_BUTTONWIDTH (70)
-#define HOME_BUTTONHEIGHT (80)
+#define HOME_BUTTONHEIGHT (68)
 //#define BUTTON_ROWCOUNT (IS_IPAD ? 7 : 5)
 #define BUTTON_ROWCOUNT (5)
 

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/HomeButtonView.m

@@ -16,7 +16,8 @@
 
 + (CGFloat)getViewHeight:(NSInteger)buttonCount {
     NSInteger addRow = buttonCount % 5 == 0 ? 0 : 1;
-    return (buttonCount / 5 + addRow) * HOME_BUTTONHEIGHT + 20;
+    NSInteger totalCount = (buttonCount / 5 + addRow);
+    return totalCount * HOME_BUTTONHEIGHT + (totalCount - 1) * HOME_BUTTON_VERTICAL_SPACE + 20;
 }
 
 /*

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/KSHomeButton.xib

@@ -10,11 +10,11 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSHomeButton">
-            <rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
+            <rect key="frame" x="0.0" y="0.0" width="80" height="68"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="专项训练" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1ld-By-usD">
-                    <rect key="frame" x="2" y="63" width="76" height="17"/>
+                    <rect key="frame" x="2" y="51" width="76" height="17"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="17" id="HmM-NJ-9X6"/>
                     </constraints>
@@ -23,13 +23,13 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <button opaque="NO" tag="1003" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z8s-SG-JhM">
-                    <rect key="frame" x="8.5" y="0.0" width="63.5" height="80"/>
+                    <rect key="frame" x="8.5" y="0.0" width="63.5" height="68"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="63.5" id="JSo-aS-lFI"/>
                     </constraints>
                 </button>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_accompany" translatesAutoresizingMaskIntoConstraints="NO" id="fGp-yj-UZk">
-                    <rect key="frame" x="15" y="12" width="50" height="50"/>
+                    <rect key="frame" x="15" y="0.0" width="50" height="50"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="50" id="a4B-wg-004"/>
                         <constraint firstAttribute="height" constant="50" id="xmk-HE-99v"/>
@@ -46,7 +46,7 @@
                 <constraint firstAttribute="trailing" secondItem="1ld-By-usD" secondAttribute="trailing" constant="2" id="bfB-Zj-nct"/>
                 <constraint firstItem="Z8s-SG-JhM" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="gyu-3P-I55"/>
                 <constraint firstItem="1ld-By-usD" firstAttribute="top" secondItem="fGp-yj-UZk" secondAttribute="bottom" constant="1" id="rks-6W-iJb"/>
-                <constraint firstItem="fGp-yj-UZk" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="t2k-gD-lM1"/>
+                <constraint firstItem="fGp-yj-UZk" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="t2k-gD-lM1"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>

+ 8 - 8
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotMusic/HomeHotMusicView.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aLQ-YK-tTY">
-                    <rect key="frame" x="356" y="13" width="44" height="18"/>
+                    <rect key="frame" x="356" y="23" width="44" height="18"/>
                     <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="18" id="GeK-bh-mkr"/>
@@ -26,7 +26,7 @@
                     </userDefinedRuntimeAttributes>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="最热曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t7j-WY-6gF">
-                    <rect key="frame" x="24" y="10" width="67.5" height="24"/>
+                    <rect key="frame" x="24" y="20" width="67.5" height="24"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="24" id="5Zd-6z-MkK"/>
                     </constraints>
@@ -35,7 +35,7 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <button opaque="NO" tag="1008" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Up-TV-A6N">
-                    <rect key="frame" x="362" y="7" width="33" height="30"/>
+                    <rect key="frame" x="362" y="17" width="33" height="30"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="30" id="ZOa-30-rEf"/>
                     </constraints>
@@ -48,26 +48,26 @@
                     </connections>
                 </button>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="更多" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2OG-Ff-YNg">
-                    <rect key="frame" x="362" y="15" width="24" height="14.5"/>
+                    <rect key="frame" x="362" y="25" width="24" height="14.5"/>
                     <fontDescription key="fontDescription" type="system" pointSize="12"/>
                     <color key="textColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_more_green" translatesAutoresizingMaskIntoConstraints="NO" id="RXl-RQ-VTX">
-                    <rect key="frame" x="389" y="18" width="6" height="8"/>
+                    <rect key="frame" x="389" y="28" width="6" height="8"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="8" id="3dv-t9-A1y"/>
                         <constraint firstAttribute="width" constant="6" id="9Vz-LP-ovZ"/>
                     </constraints>
                 </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_left" translatesAutoresizingMaskIntoConstraints="NO" id="DQd-nL-Wor">
-                    <rect key="frame" x="14" y="14.5" width="4" height="15"/>
+                    <rect key="frame" x="14" y="24.5" width="4" height="15"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="4" id="ysI-kO-iNt"/>
                     </constraints>
                 </imageView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5PX-DV-Tle">
-                    <rect key="frame" x="0.0" y="46" width="414" height="320"/>
+                    <rect key="frame" x="0.0" y="56" width="414" height="320"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="320" id="q68-6v-m4R"/>
@@ -87,7 +87,7 @@
                 <constraint firstItem="t7j-WY-6gF" firstAttribute="centerY" secondItem="DQd-nL-Wor" secondAttribute="centerY" id="HJc-jv-RnT"/>
                 <constraint firstItem="3Up-TV-A6N" firstAttribute="centerY" secondItem="t7j-WY-6gF" secondAttribute="centerY" id="Rcz-ki-VEq"/>
                 <constraint firstItem="RXl-RQ-VTX" firstAttribute="centerY" secondItem="t7j-WY-6gF" secondAttribute="centerY" id="VZ0-9S-Lac"/>
-                <constraint firstItem="t7j-WY-6gF" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="Vsf-3w-ngf"/>
+                <constraint firstItem="t7j-WY-6gF" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="Vsf-3w-ngf"/>
                 <constraint firstItem="aLQ-YK-tTY" firstAttribute="centerY" secondItem="2OG-Ff-YNg" secondAttribute="centerY" id="WuF-B0-7jc"/>
                 <constraint firstItem="RXl-RQ-VTX" firstAttribute="trailing" secondItem="aLQ-YK-tTY" secondAttribute="trailing" constant="-5" id="aJ8-A6-XsG"/>
                 <constraint firstItem="DQd-nL-Wor" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="e2G-Q7-sFN"/>

+ 0 - 9
KulexiuForStudent/KulexiuForStudent/Module/Home/View/PublicNoticeView.xib

@@ -52,15 +52,6 @@
                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                             <real key="value" value="10"/>
                         </userDefinedRuntimeAttribute>
-                        <userDefinedRuntimeAttribute type="size" keyPath="shadowOffset">
-                            <size key="value" width="0.0" height="2"/>
-                        </userDefinedRuntimeAttribute>
-                        <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
-                            <real key="value" value="1"/>
-                        </userDefinedRuntimeAttribute>
-                        <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
-                            <real key="value" value="10"/>
-                        </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
                     </userDefinedRuntimeAttributes>
                 </view>