Steven 2 years ago
parent
commit
fbd2859bce

+ 20 - 0
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -566,6 +566,10 @@
 		BC7663162827E49900C91A1D /* NotiferHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC7663102827E49800C91A1D /* NotiferHeadView.xib */; };
 		BC7663172827E49900C91A1D /* NotiferMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7663122827E49800C91A1D /* NotiferMessageCell.m */; };
 		BC7663182827E49900C91A1D /* NotiferMessageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC7663132827E49900C91A1D /* NotiferMessageCell.xib */; };
+		BC802D9728BC4FC40079E350 /* HomeHotMusicView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D9628BC4FC40079E350 /* HomeHotMusicView.m */; };
+		BC802D9928BC4FE90079E350 /* HomeHotMusicView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802D9828BC4FE90079E350 /* HomeHotMusicView.xib */; };
+		BC802D9D28BC546B0079E350 /* HomeHotMusicCollectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D9B28BC546B0079E350 /* HomeHotMusicCollectionCell.m */; };
+		BC802D9E28BC546B0079E350 /* HomeHotMusicCollectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802D9C28BC546B0079E350 /* HomeHotMusicCollectionCell.xib */; };
 		BC8A4593283DC33400094BBB /* KSCloudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A4548283DC33400094BBB /* KSCloudViewController.m */; };
 		BC8A4594283DC33400094BBB /* MidiPlayerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A454A283DC33400094BBB /* MidiPlayerEngine.m */; };
 		BC8A4595283DC33400094BBB /* GCDTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A454B283DC33400094BBB /* GCDTimer.m */; };
@@ -1836,6 +1840,12 @@
 		BC7663122827E49800C91A1D /* NotiferMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotiferMessageCell.m; sourceTree = "<group>"; };
 		BC7663132827E49900C91A1D /* NotiferMessageCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NotiferMessageCell.xib; sourceTree = "<group>"; };
 		BC7663142827E49900C91A1D /* NotiferHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotiferHeadView.h; sourceTree = "<group>"; };
+		BC802D9528BC4FC40079E350 /* HomeHotMusicView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotMusicView.h; sourceTree = "<group>"; };
+		BC802D9628BC4FC40079E350 /* HomeHotMusicView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotMusicView.m; sourceTree = "<group>"; };
+		BC802D9828BC4FE90079E350 /* HomeHotMusicView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotMusicView.xib; sourceTree = "<group>"; };
+		BC802D9A28BC546B0079E350 /* HomeHotMusicCollectionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotMusicCollectionCell.h; sourceTree = "<group>"; };
+		BC802D9B28BC546B0079E350 /* HomeHotMusicCollectionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotMusicCollectionCell.m; sourceTree = "<group>"; };
+		BC802D9C28BC546B0079E350 /* HomeHotMusicCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotMusicCollectionCell.xib; sourceTree = "<group>"; };
 		BC8A4547283DC33400094BBB /* KSCloudViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSCloudViewController.h; sourceTree = "<group>"; };
 		BC8A4548283DC33400094BBB /* KSCloudViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSCloudViewController.m; sourceTree = "<group>"; };
 		BC8A454A283DC33400094BBB /* MidiPlayerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MidiPlayerEngine.m; sourceTree = "<group>"; };
@@ -4926,6 +4936,12 @@
 				BCB9091528530E9C00F5FF69 /* KSShopCardView.h */,
 				BCB9091628530E9C00F5FF69 /* KSShopCardView.m */,
 				BCB9091828530EA500F5FF69 /* KSShopCardView.xib */,
+				BC802D9528BC4FC40079E350 /* HomeHotMusicView.h */,
+				BC802D9628BC4FC40079E350 /* HomeHotMusicView.m */,
+				BC802D9828BC4FE90079E350 /* HomeHotMusicView.xib */,
+				BC802D9A28BC546B0079E350 /* HomeHotMusicCollectionCell.h */,
+				BC802D9B28BC546B0079E350 /* HomeHotMusicCollectionCell.m */,
+				BC802D9C28BC546B0079E350 /* HomeHotMusicCollectionCell.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -5755,6 +5771,7 @@
 				BC71D25B288804CD0010F14B /* img_52.png in Resources */,
 				BC40BA202812552300DEC0D1 /* KSHomeButton.xib in Resources */,
 				BC7663162827E49900C91A1D /* NotiferHeadView.xib in Resources */,
+				BC802D9928BC4FE90079E350 /* HomeHotMusicView.xib in Resources */,
 				BCB908F22850B08D00F5FF69 /* ShareMusicCellContentView.xib in Resources */,
 				BCC583CF28A9EC6400BAB4CF /* cloud_animation_1.png in Resources */,
 				2723B5C427F157B100E0B90B /* KSChatListSearchView.xib in Resources */,
@@ -5880,6 +5897,7 @@
 				BC40B9FF281177BD00DEC0D1 /* HomeInformationCell.xib in Resources */,
 				BC8A45B3283DC33400094BBB /* CloudFeedbackView.xib in Resources */,
 				BCDE35882897B40000A9A560 /* shareImage@2x.png in Resources */,
+				BC802D9E28BC546B0079E350 /* HomeHotMusicCollectionCell.xib in Resources */,
 				275E8AB327E18F8800DD3F6E /* Main.storyboard in Resources */,
 				BC8A45A8283DC33400094BBB /* KSCloudBeatView.xib in Resources */,
 				BC71D258288804CD0010F14B /* img_49.png in Resources */,
@@ -6063,6 +6081,7 @@
 				BC0212FE27FC66AA0040569F /* InstrumentMessageModel.m in Sources */,
 				BCB6359F27F6D2AB00ACFDCF /* ClassTitleView.m in Sources */,
 				BC0D1F752810165500C5D9E5 /* VideoCourseModel.m in Sources */,
+				BC802D9D28BC546B0079E350 /* HomeHotMusicCollectionCell.m in Sources */,
 				BC119276280FB01100A716F7 /* AccompanyHomeworkCell.m in Sources */,
 				277935AC27E324A80010E277 /* MSSBrowseBaseViewController.m in Sources */,
 				2779352427E324A60010E277 /* KSUtilities.m in Sources */,
@@ -6555,6 +6574,7 @@
 				BCB635A027F6D2AB00ACFDCF /* MainToolView.m in Sources */,
 				BCB6355127F6D2A300ACFDCF /* LoginHelper.m in Sources */,
 				2723B5C127F157B100E0B90B /* ContractListCell.m in Sources */,
+				BC802D9728BC4FC40079E350 /* HomeHotMusicView.m in Sources */,
 				275FA1E527E7351900CFEA2E /* KSAccompanyWebViewController.m in Sources */,
 				BC8A45A5283DC33400094BBB /* StaffImageDisplayView.m in Sources */,
 				BC11923A280ED98E00A716F7 /* AccompanyCourseCell.m in Sources */,

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


+ 16 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicCollectionCell.h

@@ -0,0 +1,16 @@
+//
+//  HomeHotMusicCollectionCell.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/29.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeHotMusicCollectionCell : UICollectionViewCell
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicCollectionCell.m

@@ -0,0 +1,17 @@
+//
+//  HomeHotMusicCollectionCell.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/29.
+//
+
+#import "HomeHotMusicCollectionCell.h"
+
+@implementation HomeHotMusicCollectionCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+@end

+ 21 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicCollectionCell.xib

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <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="HomeHotMusicCollectionCell">
+            <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
+                <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+            </view>
+            <viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
+        </collectionViewCell>
+    </objects>
+</document>

+ 24 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicView.h

@@ -0,0 +1,24 @@
+//
+//  HomeHotMusicView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/29.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^HomeMusicActionBlock)(void);
+
+@interface HomeHotMusicView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)homeMusicMore:(HomeMusicActionBlock)callback;
+
++ (CGFloat)getViewHeight;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 46 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicView.m

@@ -0,0 +1,46 @@
+//
+//  HomeHotMusicView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/29.
+//
+
+#import "HomeHotMusicView.h"
+
+@interface HomeHotMusicView ()
+
+@property (nonatomic, copy) HomeMusicActionBlock callback;
+
+@end
+
+@implementation HomeHotMusicView
+
++ (instancetype)shareInstance {
+    HomeHotMusicView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeHotMusicView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)homeMusicMore:(HomeMusicActionBlock)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (IBAction)moreMusic:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+
++ (CGFloat)getViewHeight {
+    return 304;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 110 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/HomeHotMusicView.xib

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="HomeHotMusicView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="304"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aLQ-YK-tTY">
+                    <rect key="frame" x="355" 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="GeK-bh-mkr"/>
+                    </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="t7j-WY-6gF">
+                    <rect key="frame" x="24" y="30" width="65.5" height="22"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="22" id="5Zd-6z-MkK"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <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="361" y="26" width="34" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="30" id="ZOa-30-rEf"/>
+                    </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="moreMusic:" destination="iN0-l3-epB" eventType="touchUpInside" id="La7-fL-IFl"/>
+                    </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="361" 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="RXl-RQ-VTX">
+                    <rect key="frame" x="389" y="37" 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="32" width="4" height="18"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="18" id="rlt-cd-KJy"/>
+                        <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="64" width="414" height="240"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="240" id="q68-6v-m4R"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="2OG-Ff-YNg" firstAttribute="leading" secondItem="3Up-TV-A6N" secondAttribute="leading" id="3IU-bV-Bwj"/>
+                <constraint firstItem="5PX-DV-Tle" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="4lU-fp-zTR"/>
+                <constraint firstItem="2OG-Ff-YNg" firstAttribute="leading" secondItem="aLQ-YK-tTY" secondAttribute="leading" constant="6" id="4mW-s8-Ipb"/>
+                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="aLQ-YK-tTY" secondAttribute="trailing" constant="14" id="4xK-PM-d0A"/>
+                <constraint firstItem="RXl-RQ-VTX" firstAttribute="trailing" secondItem="3Up-TV-A6N" secondAttribute="trailing" id="8dG-Ih-dcP"/>
+                <constraint firstItem="t7j-WY-6gF" firstAttribute="leading" secondItem="DQd-nL-Wor" secondAttribute="trailing" constant="6" id="987-JH-aK9"/>
+                <constraint firstItem="5PX-DV-Tle" firstAttribute="top" secondItem="t7j-WY-6gF" secondAttribute="bottom" constant="12" id="9L4-j0-7Ud"/>
+                <constraint firstItem="RXl-RQ-VTX" firstAttribute="leading" secondItem="2OG-Ff-YNg" secondAttribute="trailing" constant="3" id="F0y-dt-dXp"/>
+                <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="30" 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"/>
+                <constraint firstItem="5PX-DV-Tle" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="qak-uV-tbh"/>
+                <constraint firstItem="2OG-Ff-YNg" firstAttribute="centerY" secondItem="t7j-WY-6gF" secondAttribute="centerY" id="x6Q-2j-qka"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="100.00000000000001" y="-36.160714285714285"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="home_left" width="4" height="12"/>
+        <image name="home_more" width="6" height="8"/>
+    </resources>
+</document>