Browse Source

声部选择显示异常。(部分机型上宽度UICollectionViewFlowLayout 宽度无法除尽导致异常)

Steven 1 year ago
parent
commit
c864b69aa2

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -2045,6 +2045,7 @@
 		BC3673D328A606A500059721 /* musicRoom_animation_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = musicRoom_animation_2.png; sourceTree = "<group>"; };
 		BC3744D228DB156E004EDFCF /* KSImageShareViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSImageShareViewController.h; sourceTree = "<group>"; };
 		BC3744D328DB156F004EDFCF /* KSImageShareViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSImageShareViewController.m; sourceTree = "<group>"; };
+		BC38181A2A4026B400B74F26 /* KSDomain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSDomain.h; sourceTree = "<group>"; };
 		BC3A4EB528DAFCF7001C4428 /* MusicTagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicTagView.h; sourceTree = "<group>"; };
 		BC3A4EB628DAFCF7001C4428 /* MusicTagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicTagView.m; sourceTree = "<group>"; };
 		BC3ACD922890D60800060E97 /* FreezeListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FreezeListViewController.h; sourceTree = "<group>"; };
@@ -3297,6 +3298,7 @@
 				2779331927E310F80010E277 /* Common.h */,
 				2779331827E310F70010E277 /* PrefixHeader.pch */,
 				2779331A27E310F90010E277 /* UserKeyHeader.h */,
+				BC38181A2A4026B400B74F26 /* KSDomain.h */,
 			);
 			path = Define;
 			sourceTree = "<group>";

+ 43 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h

@@ -0,0 +1,43 @@
+//
+//  KSDomain.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/6/19.
+//
+
+#ifndef KSDomain_h
+#define KSDomain_h
+
+//#ifdef DEBUG
+
+//#define hostURL (@"https://dev.colexiu.com")
+//#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://dev.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (NO)
+//#define RCIM_KEY (@"0vnjpoad0jbdz")
+//#define SUBMIT_UUID (YES)
+
+// 预生产环境
+//#define hostURL (@"https://ponline.colexiu.com")
+//#define SEALCLASSHOST (@"https://ponline.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://ponline.colexiu.com/teacher")
+//#define SOCKET_URL (@"wss://ponline.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (NO)
+//#define RCIM_KEY (@"0vnjpoad0jbdz")
+//#define SUBMIT_UUID (YES)
+
+//#else
+
+#define hostURL (@"https://online.colexiu.com")
+#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+#define WEBHOST (@"https://online.colexiu.com/teacher")
+#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (YES)
+#define RCIM_KEY (@"e5t4ouvpe42pa")
+#define SUBMIT_UUID (YES)
+
+
+//#endif
+
+#endif /* KSDomain_h */

+ 1 - 31
KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch

@@ -133,37 +133,7 @@ shouldPrevent = NO; \
 // Include any system framework and library headers here that should be included in all compilation units.
 // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
 
+#import "KSDomain.h"
 
-//#ifdef DEBUG
-
-#define hostURL (@"https://dev.colexiu.com")
-#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
-#define WEBHOST (@"https://dev.colexiu.com/teacher")
-#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-#define JSPUSH_ENVIRONMENT (NO)
-#define RCIM_KEY (@"0vnjpoad0jbdz")
-#define SUBMIT_UUID (YES)
-
-// 预生产环境
-//#define hostURL (@"https://ponline.colexiu.com")
-//#define SEALCLASSHOST (@"https://ponline.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://ponline.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://ponline.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (NO)
-//#define RCIM_KEY (@"0vnjpoad0jbdz")
-//#define SUBMIT_UUID (YES)
-
-//#else
-
-//#define hostURL (@"https://online.colexiu.com")
-//#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://online.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (YES)
-//#define RCIM_KEY (@"e5t4ouvpe42pa")
-//#define SUBMIT_UUID (YES)
-
-
-//#endif
 
 #endif /* PrefixHeader_pch */

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m

@@ -276,7 +276,7 @@
 - (UICollectionView *)collectionView {
     if (!_collectionView) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-        CGFloat width = (kScreen_Width - 15 * 2 - 20) / 3.0f;
+        CGFloat width = (NSInteger)((KPortraitWidth - 15 * 2 - 20) / 3);
         CGFloat height = width;
         layout.itemSize = CGSizeMake(width, height);
         layout.headerReferenceSize = CGSizeMake(kScreen_Width - 30, 40);