Steven 2 years ago
parent
commit
b3c04a5d49

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 16 - 0
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -516,5 +516,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EB1CAF44-C1EE-42A4-8F62-76ED6C2F5924"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Home/Controller/NewHomeViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1216"
+            endingLineNumber = "1216"
+            landmarkName = "-homeNavAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 12 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/NewHomeViewController.m

@@ -1159,7 +1159,7 @@
 
 - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
     if (collectionView == self.albumCollectionView) {
-        return CGSizeMake(100, 140);
+        return CGSizeMake(100, 134);
     }
     else if (collectionView == self.musicCollectionView) {
         return CGSizeMake(KPortraitWidth * 0.83, 240);
@@ -1212,7 +1212,7 @@
         case HOMENAV_TAG_SEARCH: // 搜索
         {
             KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-            webCtrl.url = [NSString stringWithFormat:@"%@/music-songbook/search", WEBHOST];
+            webCtrl.url = [NSString stringWithFormat:@"%@/#/music-songbook/search", WEBHOST];
             [self.navigationController pushViewController:webCtrl animated:YES];
         }
             break;
@@ -1533,6 +1533,10 @@
     if (!_talentView) {
         _talentView = [HomeHotTalentView shareInstance];
         [_talentView.talentContentView addSubview:self.talentCollectionView];
+        MJWeakSelf;
+        [_talentView homeTalentMore:^{
+            [weakSelf teacherMoreIntorduce];
+        }];
         [self.talentCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
             make.left.right.bottom.top.mas_equalTo(_talentView.talentContentView);
         }];
@@ -1540,6 +1544,12 @@
     return _talentView;
 }
 
+- (void)teacherMoreIntorduce {
+    KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+    ctrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherElegant"];
+    [self.navigationController pushViewController:ctrl animated:YES];
+}
+
 - (UICollectionView *)talentCollectionView {
     if (!_talentCollectionView) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotAlbum/HomeHotAlbumCell.xib

@@ -11,10 +11,10 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="HomeHotAlbumCell">
-            <rect key="frame" x="0.0" y="0.0" width="100" height="140"/>
+            <rect key="frame" x="0.0" y="0.0" width="100" height="134"/>
             <autoresizingMask key="autoresizingMask"/>
             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
-                <rect key="frame" x="0.0" y="0.0" width="100" height="140"/>
+                <rect key="frame" x="0.0" y="0.0" width="100" height="134"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
                     <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="video_placeholder" translatesAutoresizingMaskIntoConstraints="NO" id="mkp-8k-Rld">

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotAlbum/HomeHotAlbumView.m

@@ -34,7 +34,7 @@
 
 
 + (CGFloat)getViewHeight {
-    return 194.0f;
+    return 188.0f;
 }
 
 /*

+ 12 - 12
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotAlbum/HomeHotAlbumView.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="HomeHotAlbumView">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="180"/>
+            <rect key="frame" x="0.0" y="0.0" width="414" height="188"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i48-Hd-WKl">
-                    <rect key="frame" x="349" y="12" width="45" height="18"/>
+                    <rect key="frame" x="349" y="32" width="45" height="18"/>
                     <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="18" id="J1Q-HM-3AQ"/>
@@ -26,13 +26,13 @@
                     </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="zgK-R6-zz8">
-                    <rect key="frame" x="355" y="14" width="25" height="14.5"/>
+                    <rect key="frame" x="355" y="34" width="25" height="14.5"/>
                     <fontDescription key="fontDescription" type="system" pointSize="12"/>
                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="热门专辑" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u9G-3b-Wgt">
-                    <rect key="frame" x="29" y="10" width="65.5" height="22"/>
+                    <rect key="frame" x="29" y="30" width="65.5" height="22"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="22" id="mNH-cs-reJ"/>
                     </constraints>
@@ -41,21 +41,21 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_more" translatesAutoresizingMaskIntoConstraints="NO" id="OkW-qe-3Kq">
-                    <rect key="frame" x="383" y="17" width="6" height="8"/>
+                    <rect key="frame" x="383" y="37" width="6" height="8"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="6" id="PEX-ax-k36"/>
                         <constraint firstAttribute="height" constant="8" id="QOU-bK-jTl"/>
                     </constraints>
                 </imageView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvf-n0-Khb">
-                    <rect key="frame" x="0.0" y="46" width="414" height="140"/>
+                    <rect key="frame" x="0.0" y="54" width="414" height="134"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="140" id="hLT-Oy-zVJ"/>
+                        <constraint firstAttribute="height" constant="134" id="hLT-Oy-zVJ"/>
                     </constraints>
                 </view>
                 <button opaque="NO" tag="1008" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kIU-g4-ctC">
-                    <rect key="frame" x="355" y="6" width="34" height="30"/>
+                    <rect key="frame" x="355" y="26" width="34" height="30"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="30" id="l3w-24-Jol"/>
                     </constraints>
@@ -68,7 +68,7 @@
                     </connections>
                 </button>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_left" translatesAutoresizingMaskIntoConstraints="NO" id="yKI-ip-Z1l">
-                    <rect key="frame" x="19" y="12" width="4" height="18"/>
+                    <rect key="frame" x="19" y="32" width="4" height="18"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="4" id="0n6-S5-hNN"/>
                         <constraint firstAttribute="height" constant="18" id="DZG-as-IKL"/>
@@ -82,12 +82,12 @@
                 <constraint firstAttribute="trailing" secondItem="i48-Hd-WKl" secondAttribute="trailing" constant="20" id="61L-Vw-Zhd"/>
                 <constraint firstAttribute="trailing" secondItem="bvf-n0-Khb" secondAttribute="trailing" id="Hzs-4d-CyT"/>
                 <constraint firstItem="OkW-qe-3Kq" firstAttribute="trailing" secondItem="kIU-g4-ctC" secondAttribute="trailing" id="Jbh-O6-QXS"/>
-                <constraint firstItem="bvf-n0-Khb" firstAttribute="top" secondItem="u9G-3b-Wgt" secondAttribute="bottom" constant="14" id="M9Y-eb-zMS"/>
+                <constraint firstItem="bvf-n0-Khb" firstAttribute="top" secondItem="u9G-3b-Wgt" secondAttribute="bottom" constant="2" id="M9Y-eb-zMS"/>
                 <constraint firstItem="bvf-n0-Khb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="a0y-wq-MEu"/>
                 <constraint firstItem="u9G-3b-Wgt" firstAttribute="leading" secondItem="yKI-ip-Z1l" secondAttribute="trailing" constant="6" id="aPK-M2-gIU"/>
                 <constraint firstItem="OkW-qe-3Kq" firstAttribute="leading" secondItem="zgK-R6-zz8" secondAttribute="trailing" constant="3" id="aT3-GI-PH3"/>
                 <constraint firstItem="u9G-3b-Wgt" firstAttribute="centerY" secondItem="yKI-ip-Z1l" secondAttribute="centerY" id="dKq-YN-3yA"/>
-                <constraint firstItem="u9G-3b-Wgt" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="eRX-8J-T9f"/>
+                <constraint firstItem="u9G-3b-Wgt" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="30" id="eRX-8J-T9f"/>
                 <constraint firstItem="zgK-R6-zz8" firstAttribute="leading" secondItem="kIU-g4-ctC" secondAttribute="leading" id="fOa-SI-oGA"/>
                 <constraint firstItem="yKI-ip-Z1l" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="19" id="lGn-jJ-ZR0"/>
                 <constraint firstItem="zgK-R6-zz8" firstAttribute="leading" secondItem="i48-Hd-WKl" secondAttribute="leading" constant="6" id="o53-pl-Ohx"/>
@@ -101,7 +101,7 @@
             <connections>
                 <outlet property="albumContentView" destination="bvf-n0-Khb" id="o8m-Jb-zPr"/>
             </connections>
-            <point key="canvasLocation" x="131.8840579710145" y="1.3392857142857142"/>
+            <point key="canvasLocation" x="131.8840579710145" y="7.3660714285714279"/>
         </view>
     </objects>
     <resources>

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentCell.xib

@@ -119,6 +119,7 @@
                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                 <real key="value" value="10"/>
                             </userDefinedRuntimeAttribute>
+                            <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="YES"/>
                         </userDefinedRuntimeAttributes>
                     </view>
                 </subviews>

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentView.h

@@ -7,6 +7,7 @@
 
 #import <UIKit/UIKit.h>
 
+typedef void(^HomeMoreTalentCallback)(void);
 NS_ASSUME_NONNULL_BEGIN
 
 @interface HomeHotTalentView : UIView
@@ -15,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (instancetype)shareInstance;
 
-//- (void)homeAlbumMore:(HomeAlbumMoreBlock)callback;
+- (void)homeTalentMore:(HomeMoreTalentCallback)callback;
 
 + (CGFloat)getViewHeight;
 @end

+ 18 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentView.m

@@ -7,14 +7,31 @@
 
 #import "HomeHotTalentView.h"
 
+@interface HomeHotTalentView ()
+
+@property (nonatomic, copy) HomeMoreTalentCallback callback;
+
+@end
+
 @implementation HomeHotTalentView
 + (instancetype)shareInstance {
     HomeHotTalentView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeHotTalentView" owner:nil options:nil] firstObject];
     return view;
 }
+- (IBAction)moreTeacher:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+
+- (void)homeTalentMore:(HomeMoreTalentCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
 
 + (CGFloat)getViewHeight {
-    return 200;
+    return 212;
 }
 /*
 // Only override drawRect: if you perform custom drawing.

+ 50 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HotTalent/HomeHotTalentView.xib

@@ -10,7 +10,7 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HomeHotTalentView">
-            <rect key="frame" x="0.0" y="0.0" width="623" height="233"/>
+            <rect key="frame" x="0.0" y="0.0" width="623" height="212"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="推荐达人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ocF-cI-geX">
@@ -36,9 +36,56 @@
                         <constraint firstAttribute="width" constant="4" id="vXT-S1-5L3"/>
                     </constraints>
                 </imageView>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rZg-YL-a5F">
+                    <rect key="frame" x="564" y="32" width="45" height="18"/>
+                    <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="18" id="OkI-Tj-OYy"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="9"/>
+                        </userDefinedRuntimeAttribute>
+                    </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="nhJ-zw-nWQ">
+                    <rect key="frame" x="570" y="34" width="25" height="14.5"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                    <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_more" translatesAutoresizingMaskIntoConstraints="NO" id="e4W-Jc-T1U">
+                    <rect key="frame" x="598" y="37" width="6" height="8"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="8" id="9gb-VU-p9w"/>
+                        <constraint firstAttribute="width" constant="6" id="prd-cf-z4Y"/>
+                    </constraints>
+                </imageView>
+                <button opaque="NO" tag="1008" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="J76-uF-Ucm">
+                    <rect key="frame" x="570" y="26" width="34" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="30" id="O0L-Nf-Gcm"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                    <state key="normal">
+                        <color key="titleColor" red="0.46666666670000001" green="0.46666666670000001" blue="0.46666666670000001" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
+                    </state>
+                    <connections>
+                        <action selector="moreTeacher:" destination="iN0-l3-epB" eventType="touchUpInside" id="5QB-8F-LjT"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
+                <constraint firstItem="e4W-Jc-T1U" firstAttribute="centerY" secondItem="J76-uF-Ucm" secondAttribute="centerY" id="0hC-jK-jOh"/>
+                <constraint firstItem="nhJ-zw-nWQ" firstAttribute="leading" secondItem="rZg-YL-a5F" secondAttribute="leading" constant="6" id="5iF-ks-RB3"/>
+                <constraint firstItem="nhJ-zw-nWQ" firstAttribute="centerY" secondItem="rZg-YL-a5F" secondAttribute="centerY" id="6bw-19-XYy"/>
+                <constraint firstItem="J76-uF-Ucm" firstAttribute="centerY" secondItem="rZg-YL-a5F" secondAttribute="centerY" id="AL1-ex-myd"/>
+                <constraint firstItem="nhJ-zw-nWQ" firstAttribute="leading" secondItem="J76-uF-Ucm" secondAttribute="leading" id="ByY-tK-Azm"/>
+                <constraint firstAttribute="trailing" secondItem="rZg-YL-a5F" secondAttribute="trailing" constant="14" id="CFC-AB-Tce"/>
+                <constraint firstItem="rZg-YL-a5F" firstAttribute="centerY" secondItem="ocF-cI-geX" secondAttribute="centerY" id="Mvd-AC-E4n"/>
+                <constraint firstItem="e4W-Jc-T1U" firstAttribute="trailing" secondItem="J76-uF-Ucm" secondAttribute="trailing" id="QCG-3U-FIq"/>
+                <constraint firstItem="e4W-Jc-T1U" firstAttribute="trailing" secondItem="rZg-YL-a5F" secondAttribute="trailing" constant="-5" id="VTq-fy-AMd"/>
                 <constraint firstItem="TvN-a5-fF0" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="c8p-em-0SR"/>
                 <constraint firstItem="ocF-cI-geX" firstAttribute="centerY" secondItem="yk3-O1-fKs" secondAttribute="centerY" id="d7f-tY-UGC"/>
                 <constraint firstItem="ocF-cI-geX" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="30" id="ddX-0C-PSD"/>
@@ -46,6 +93,7 @@
                 <constraint firstItem="TvN-a5-fF0" firstAttribute="top" secondItem="ocF-cI-geX" secondAttribute="bottom" constant="14" id="qVZ-Bi-MOx"/>
                 <constraint firstItem="yk3-O1-fKs" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="r3r-b1-RY9"/>
                 <constraint firstItem="ocF-cI-geX" firstAttribute="leading" secondItem="yk3-O1-fKs" secondAttribute="trailing" constant="6" id="s7t-ve-29J"/>
+                <constraint firstItem="e4W-Jc-T1U" firstAttribute="leading" secondItem="nhJ-zw-nWQ" secondAttribute="trailing" constant="3" id="ukh-iq-egl"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
@@ -58,5 +106,6 @@
     </objects>
     <resources>
         <image name="home_left" width="4" height="12"/>
+        <image name="home_more" width="6" height="8"/>
     </resources>
 </document>