Browse Source

pad相关适配

Steven 1 year ago
parent
commit
6285d238cc
28 changed files with 318 additions and 120 deletions
  1. 4 4
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 99 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcshareddata/xcschemes/KulexiuForTeacher.xcscheme
  3. 1 1
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  4. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/Contents.json
  5. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/mineWorks_bgPad@2x.png
  6. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/mineWorks_bgPad@3x.png
  7. 20 20
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h
  8. 12 1
      KulexiuForTeacher/KulexiuForTeacher/Module/AnimationLaunch/Controller/LaunchAnimationViewController.m
  9. 40 37
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m
  10. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.h
  11. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.xib
  12. 45 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m
  13. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantCreateGroupBodyView.m
  14. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  15. 4 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyAlertView.m
  16. 4 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyAlertView.xib
  17. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  18. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  19. 11 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.m
  20. 4 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.xib
  21. 5 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/VefiBodyView.m
  22. 18 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/VefiBodyView.xib
  23. 3 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m
  24. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/MyStyleViewController.m
  25. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveList/View/LiveListBodyView.m
  26. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMienBodyView.m
  27. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/VeriCheckView.m
  28. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Works/Controller/MineWorksViewController.m

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -6579,8 +6579,8 @@
 		BC71D17F2887FDAB0010F14B /* Controller */ = {
 			isa = PBXGroup;
 			children = (
-				BC71D1802887FDAB0010F14B /* LaunchAnimationViewController.m */,
 				BC71D1812887FDAB0010F14B /* LaunchAnimationViewController.h */,
+				BC71D1802887FDAB0010F14B /* LaunchAnimationViewController.m */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -7665,9 +7665,9 @@
 		BCB9FA3C286DA337005D766B /* View */ = {
 			isa = PBXGroup;
 			children = (
-				BCB9FA3D286DA337005D766B /* GuideListView.xib */,
 				BCB9FA3E286DA337005D766B /* GuideListView.h */,
 				BCB9FA3F286DA337005D766B /* GuideListView.m */,
+				BCB9FA3D286DA337005D766B /* GuideListView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -9710,7 +9710,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 17.2;
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
@@ -9764,7 +9764,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 17.2;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
 				SDKROOT = iphoneos;

+ 99 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcshareddata/xcschemes/KulexiuForTeacher.xcscheme

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1500"
+   version = "1.7">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "275E8A6327E18F2300DD3F6E"
+               BuildableName = "KulexiuForTeacher.app"
+               BlueprintName = "KulexiuForTeacher"
+               ReferencedContainer = "container:KulexiuForTeacher.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      shouldAutocreateTestPlan = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "275E8A7E27E18F2800DD3F6E"
+               BuildableName = "KulexiuForTeacherTests.xctest"
+               BlueprintName = "KulexiuForTeacherTests"
+               ReferencedContainer = "container:KulexiuForTeacher.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "275E8A8827E18F2900DD3F6E"
+               BuildableName = "KulexiuForTeacherUITests.xctest"
+               BlueprintName = "KulexiuForTeacherUITests"
+               ReferencedContainer = "container:KulexiuForTeacher.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "275E8A6327E18F2300DD3F6E"
+            BuildableName = "KulexiuForTeacher.app"
+            BlueprintName = "KulexiuForTeacher"
+            ReferencedContainer = "container:KulexiuForTeacher.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "275E8A6327E18F2300DD3F6E"
+            BuildableName = "KulexiuForTeacher.app"
+            BlueprintName = "KulexiuForTeacher"
+            ReferencedContainer = "container:KulexiuForTeacher.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -205,7 +205,7 @@
     // 配置友盟分享
     // 微信、QQ、微博完整版会校验合法的universalLink,不设置会在初始化平台失败
        //配置微信Universal Link需注意 universalLinkDic的key是rawInt类型,不是枚举类型 ,即为 UMSocialPlatformType.wechatSession.rawInt
-    NSString *callbackUrl = [NSString stringWithFormat:@"%@%@",hostURL,@"/teacherApp/"];
+    NSString *callbackUrl = [NSString stringWithFormat:@"%@%@",@"https://online.colexiu.com",@"/teacherApp/"];
     [UMSocialGlobal shareInstance].universalLinkDic = @{@(UMSocialPlatformType_WechatSession):callbackUrl,@(UMSocialPlatformType_Sina):callbackUrl};
     /* 设置微信的appKey和appSecret */
     [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@"wx149a928c415c137a" appSecret:@"d3f119b577ccacb262da153f4210174f" redirectURL:nil];

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "mineWorks_bgPad@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "mineWorks_bgPad@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/mineWorks_bgPad@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/PlayerImage/mineWorks_bgPad.imageset/mineWorks_bgPad@3x.png


+ 20 - 20
KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h

@@ -25,16 +25,16 @@
 //#define WhiteBoardHostURL (@"https://test.dayaedu.com")
 
 // 测试环境
-//#define hostURL (@"https://test.colexiu.com")
-//#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://test.colexiu.com/teacher")
-//#define SOCKET_URL (@"wss://test.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (NO)
-//#define RCIM_KEY (@"0vnjpoad0jbdz")
-//#define SUBMIT_UUID (NO)
-//#define CONFIG_TXSDKAPPID (1400805079)
-//#define TXOfflinePushCertificateIDForAPNS (39559)
-//#define WhiteBoardHostURL (@"https://test.dayaedu.com")
+#define hostURL (@"https://test.colexiu.com")
+#define SEALCLASSHOST (@"https://test.colexiu.com/api-classroom")
+#define WEBHOST (@"https://test.colexiu.com/teacher")
+#define SOCKET_URL (@"wss://test.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (NO)
+#define RCIM_KEY (@"0vnjpoad0jbdz")
+#define SUBMIT_UUID (NO)
+#define CONFIG_TXSDKAPPID (1400805079)
+#define TXOfflinePushCertificateIDForAPNS (39559)
+#define WhiteBoardHostURL (@"https://test.dayaedu.com")
 
 // 预生产
 //#define hostURL (@"https://ponline.colexiu.com")
@@ -50,16 +50,16 @@
 
 //#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)
-#define CONFIG_TXSDKAPPID (1400799837)
-#define TXOfflinePushCertificateIDForAPNS (39561)
-#define WhiteBoardHostURL (@"https://online.dayaedu.com")
+//#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)
+//#define CONFIG_TXSDKAPPID (1400799837)
+//#define TXOfflinePushCertificateIDForAPNS (39561)
+//#define WhiteBoardHostURL (@"https://online.dayaedu.com")
 
 //#endif
 

+ 12 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/AnimationLaunch/Controller/LaunchAnimationViewController.m

@@ -40,6 +40,18 @@
 - (void)setJsonName:(NSString *)jsonName {
     self.jsonString = jsonName;
     [self.view addSubview:self.loadingView];
+    CGFloat width = KPortraitWidth;
+    CGFloat height = width / 1125 * 2436;
+    if (height > KPortraitHeight) {
+        height = KPortraitHeight;
+        width = height / 2436 * 1125;
+    }
+    [self.loadingView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.view.mas_centerX);
+        make.centerY.mas_equalTo(self.view.mas_centerY);
+        make.width.mas_equalTo(width);
+        make.height.mas_equalTo(height);
+    }];
     MJWeakSelf;
     [self.loadingView playWithCompletion:^(BOOL animationFinished) {
         [weakSelf successBack];
@@ -57,7 +69,6 @@
         //1.加载本地json
         _loadingView = [LOTAnimationView animationNamed:self.jsonString];
         //2.加载后台给的json(url)
-        _loadingView.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
         _loadingView.loopAnimation = YES;
         _loadingView.contentMode = UIViewContentModeScaleAspectFill;
         _loadingView.animationSpeed = 1.0;

+ 40 - 37
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -9,19 +9,19 @@
 #import "KSChatComplainController.h"
 #import "ChatComplainBodyView.h"
 #import "LLPhotoBrowser.h"
-#import "KSComplainImageDisplayView.h"
-#import "KSPhotoChooseView.h"
 #import "KSMediaManager.h"
 
 #import "UIImage+ResizeImage.h"
 #import "MSSBrowseDefine.h"
 #import "ChatComplainBottomView.h"
+#import "CourseFileDisplayView.h"
 
 #define MAXBIGPHOTONUMBER (3)
 #define MAXPHOTONUMBER (3)
 #define COLUMNNUMBER (3)
-#define BUTTONWIDTH  (101)
-#define BUTTONHEIGHT (101)
+
+#define ROWCOUNT (IS_IPAD ? 5 : 3)
+
 
 @interface KSChatComplainController ()<LLPhotoBrowserDelegate>
 
@@ -135,63 +135,66 @@
     for (UIView *subView in self.bodyView.imageContentView.subviews) {
         [subView removeFromSuperview];
     }
-    CGFloat space = 12;
-
-    CGFloat midSpace = (KPortraitWidth - 26 - space * 2 - BUTTONWIDTH * 3) / 2.0f;
+    CGFloat midSpace = 10;
+    CGFloat leftSpace = 12;
+    CGFloat buttonWidth = IS_IPAD ? 112 : (KPortraitWidth - leftSpace * 2 - leftSpace * 2 - midSpace * 2) / 3;
+    CGFloat buttonHeight = buttonWidth;
     
-    NSInteger section = self.imageArray.count/3 + 1;
-    if (self.imageArray.count==MAXPHOTONUMBER) {
-        section = MAXPHOTONUMBER / 3;
-    }
-    CGFloat topSpace = 0.0f;
     CGFloat currentX = 0;
     CGFloat currentY = 0;
     for (NSInteger index = 0; index < self.imageArray.count; index++) {
-        currentX = (index) % 3 * (BUTTONWIDTH + midSpace) + space;
-        currentY = (index) / 3 * (BUTTONHEIGHT + topSpace);
+        currentX = index % ROWCOUNT * (buttonWidth + midSpace);
+        currentY = index / ROWCOUNT * (buttonHeight + midSpace);
         UIImage *image = self.imageArray [index];
-        
-        CGRect frame = CGRectMake(currentX, currentY, BUTTONWIDTH, BUTTONHEIGHT);
-        KSComplainImageDisplayView *displayView = [KSComplainImageDisplayView shareInstance];
-        displayView.frame = frame;
-        displayView.tag = 1000 + index;
+        CGRect frame = CGRectMake(currentX, currentY, buttonWidth, buttonHeight);
         MJWeakSelf;
-        [displayView displayImage:image callback:^(BOOL isShow, NSInteger viewIndex) {
-            if (isShow) {
-                [weakSelf displayImage:viewIndex];
+        CourseFileDisplayView *displayView = [CourseFileDisplayView shareInstance];
+        displayView.tag = 1000+index;
+        displayView.frame = frame;
+        [displayView displayImage:image callback:^(FILETYPE fileType, BOOL isPlay, NSInteger viewIndex) {
+            if (isPlay) {
+                LLPhotoBrowser *photoBrowser = [[LLPhotoBrowser alloc] initWithImages:weakSelf.imageArray currentIndex:viewIndex];
+                photoBrowser.delegate = weakSelf;
+                photoBrowser.modalPresentationStyle = UIModalPresentationFullScreen;
+                [weakSelf presentViewController:photoBrowser animated:YES completion:nil];
             }
             else {
-                [weakSelf removeImage:viewIndex];
+                [weakSelf deleteImageWithIndex:viewIndex];
             }
         }];
         [self.bodyView.imageContentView addSubview:displayView];
     }
-    
+    currentX = self.imageArray .count % ROWCOUNT * (buttonWidth + midSpace);
+
     if (self.imageArray.count != MAXPHOTONUMBER) {
         //计算下一个添加按钮位置
-        currentX = (self.imageArray.count) % 3 * (BUTTONWIDTH + midSpace) + space;
-        currentY = (self.imageArray.count) / 3 * (BUTTONHEIGHT + topSpace);
+        if (self.imageArray.count % ROWCOUNT == 0) {
+            currentY = (self.imageArray.count + 1) / ROWCOUNT * (buttonHeight + midSpace);
+        }
+        UIButton *cameraButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        cameraButton.frame = CGRectMake(currentX, currentY, buttonWidth, buttonHeight);
+        
+        NSString *imgName = @"choose_photo_green";
 
-        KSPhotoChooseView *button = [KSPhotoChooseView shareInstance];
-        button.frame = CGRectMake(currentX, currentY, BUTTONWIDTH, BUTTONHEIGHT);
+        [cameraButton setBackgroundImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];
+        [cameraButton setBackgroundImage:[UIImage imageNamed:imgName] forState:UIControlStateHighlighted];
+        [cameraButton addTarget:self action:@selector(chooseImageAction) forControlEvents:UIControlEventTouchUpInside];
+        [self.bodyView.imageContentView addSubview:cameraButton];
+        
         CAShapeLayer *border = [CAShapeLayer layer];
         border.strokeColor = HexRGB(0xCFCFCF).CGColor;
         border.fillColor = nil;
-        border.path = [UIBezierPath bezierPathWithRoundedRect:button.bounds cornerRadius:10.0f].CGPath;
-        border.frame = button.bounds;
+        border.path = [UIBezierPath bezierPathWithRoundedRect:cameraButton.bounds cornerRadius:10.0f].CGPath;
+        border.frame = cameraButton.bounds;
         border.lineWidth = 1.f;
         border.lineCap = @"square";
         border.lineDashPattern = @[@4, @4];
-        [button.imagePlace.layer addSublayer:border];
-        MJWeakSelf;
-        [button chooseCallback:^{
-            [weakSelf chooseImageAction];
-        }];
-        [self.bodyView.imageContentView addSubview:button];
+        [cameraButton.layer addSublayer:border];
     }
     
     // 刷新scroll contentsize
-    CGFloat imageContentHeight =  101;
+    CGFloat imageContentHeight = buttonHeight;
+    self.bodyView.imgContainerHeight.constant = imageContentHeight;
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 590 + imageContentHeight ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 590 + imageContentHeight;
     CGRect frame = self.bodyView.frame;
     frame.size.height = height;

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.h

@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface ChatComplainBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgContainerHeight;
+
 @property (weak, nonatomic) IBOutlet UITextView *inputText;
 
 @property (weak, nonatomic) IBOutlet UIView *imageContentView;

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -98,7 +98,7 @@
                             </constraints>
                         </imageView>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrg-7V-2Sn">
-                            <rect key="frame" x="0.0" y="50" width="388" height="101"/>
+                            <rect key="frame" x="12" y="50" width="364" height="101"/>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="101" id="CP8-UI-leD"/>
@@ -116,9 +116,9 @@
                     </subviews>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstItem="Xrg-7V-2Sn" firstAttribute="leading" secondItem="KDf-B7-emx" secondAttribute="leading" id="7kS-7l-Yby"/>
+                        <constraint firstItem="Xrg-7V-2Sn" firstAttribute="leading" secondItem="KDf-B7-emx" secondAttribute="leading" constant="12" id="7kS-7l-Yby"/>
                         <constraint firstAttribute="bottom" secondItem="Xrg-7V-2Sn" secondAttribute="bottom" constant="20" id="SZb-Bg-QcY"/>
-                        <constraint firstAttribute="trailing" secondItem="Xrg-7V-2Sn" secondAttribute="trailing" id="ULU-7z-6TL"/>
+                        <constraint firstAttribute="trailing" secondItem="Xrg-7V-2Sn" secondAttribute="trailing" constant="12" id="ULU-7z-6TL"/>
                         <constraint firstItem="oi4-ac-uGd" firstAttribute="centerY" secondItem="jQb-YZ-Bxc" secondAttribute="centerY" id="jGL-jc-yAb"/>
                         <constraint firstItem="jQb-YZ-Bxc" firstAttribute="leading" secondItem="KDf-B7-emx" secondAttribute="leading" constant="12" id="lGC-0s-boz"/>
                         <constraint firstItem="Xrg-7V-2Sn" firstAttribute="top" secondItem="jQb-YZ-Bxc" secondAttribute="bottom" constant="12" id="mtG-2e-17R"/>

+ 45 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m

@@ -132,12 +132,18 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
 
 @property (nonatomic, assign) BOOL canAddMember;
 
+@property (nonatomic, strong) UIScrollView *memberScrollView;
+
 @end
 
 @implementation GroupSettingBodyView
 - (void)awakeFromNib {
     [super awakeFromNib];
     self.isOn = NO;
+    [self.memberView addSubview:self.memberScrollView];
+    [self.memberScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.memberView);
+    }];
 }
 + (instancetype)shareInstance  {
     GroupSettingBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"GroupSettingBodyView" owner:nil options:nil] firstObject];
@@ -204,12 +210,15 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
     else {
         self.memberCount.text = [NSString stringWithFormat:@"查看全部%zd名群成员", studentArray.count];
     }
-    [self.memberView removeAllSubViews];
-    CGFloat width = kScreenWidth / 5;
+    [self removeAllSubviews:self.memberScrollView];
+
+    NSInteger maxCount = IS_IPAD ? 9 : 5;
+    CGFloat width = KPortraitWidth / maxCount;
+    NSInteger maxDisplay = maxCount;
+    
     NSInteger count = 0;
-    NSInteger maxDisplay = 5;
     if (self.canAddMember) {
-        maxDisplay = 4;
+        maxDisplay = maxCount - 1;
     }
     if (studentArray.count < maxDisplay) {
         count = studentArray.count;
@@ -225,7 +234,16 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
         [view configMemberWithUrl:model.avatar name:model.nickname targetId:model.imUserId isOwner:model.isAdmin callback:^(NSString *targetId) {
                     
         }];
-        [self.memberView addSubview:view];
+        [self.memberScrollView addSubview:view];
+        [view mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.bottom.mas_equalTo(self.memberScrollView);
+            make.left.mas_equalTo(self.memberScrollView.mas_left).offset(width * i);
+            make.width.mas_equalTo(width);
+            make.height.mas_equalTo(100);
+            if (i == count -1 && self.canAddMember == NO) {
+                make.right.mas_equalTo(self.memberScrollView.mas_right);
+            }
+        }];
     }
     
     // 添加按钮
@@ -236,11 +254,25 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
         [view configMemberWithNativeImage:@"group_memberAdd" name:@"添加" callback:^(NSString *targetId) {
             [weakSelf addMember];
         }];
-        [self.memberView addSubview:view];
+        [self.memberScrollView addSubview:view];
+        
+        [view mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.bottom.mas_equalTo(self.memberScrollView);
+            make.left.mas_equalTo(self.memberScrollView.mas_left).offset(width * count);
+            make.width.mas_equalTo(width);
+            make.height.mas_equalTo(100);
+            make.right.mas_equalTo(self.memberScrollView.mas_right);
+        }];
     }
     
 }
 
+- (void)removeAllSubviews:(UIView *)view {
+    while (view.subviews.count) {
+        [view.subviews.lastObject removeFromSuperview];
+    }
+}
+
 - (void)addMember {
     if (self.callback) {
         self.callback(GROUPSETTING_ADDMENBER);
@@ -308,6 +340,13 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
     NSString *imageName = isOn ? @"switch_on" : @"switch_off";
     [self.switchButton setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
 }
+
+- (UIScrollView *)memberScrollView {
+    if (!_memberScrollView) {
+        _memberScrollView = [[UIScrollView alloc] init];
+    }
+    return _memberScrollView;
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/TenantGroupCreate/TenantCreateGroupBodyView.m

@@ -55,7 +55,8 @@
         self.memberDisplayHeigh.constant = 0;
     }
     [self.scrollView removeAllSubViews];
-    CGFloat width = (KPortraitWidth - 28) / 5.0f;
+    NSInteger maxCount = IS_IPAD ? 9 : 5;
+    CGFloat width = (KPortraitWidth - 28) / maxCount;
     CGFloat xPosition = 0.0f;
     for (NSInteger index = 0; index < array.count; index++) {
         xPosition = index * width;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -352,7 +352,7 @@
 
 #pragma mark ------ WMPlayer
 - (void)playVideoWithUrl:(NSString *)fileUrl {
-    fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    fileUrl = [fileUrl getUrlEndcodeString];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
     _wmPlayer = [[WMPlayer alloc] initWithFrame:_playerFrame];
     WMPlayerModel *playModel = [[WMPlayerModel alloc] init];

+ 4 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyAlertView.m

@@ -9,6 +9,7 @@
 #import "KSStarView.h"
 
 @interface AccompanyAlertView ()<UITextViewDelegate>
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *viewLeft;
 
 @property (weak, nonatomic) IBOutlet KSStarView *starView;
 
@@ -23,6 +24,9 @@
     self.inputView.delegate = self;
     self.starView.hidden = YES;
     self.starView.allowMark = YES;
+    if (IS_IPAD) {
+        self.viewLeft.constant = KPortraitWidth / 4;
+    }
 }
 
 + (instancetype)shareInstance {

+ 4 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyAlertView.xib

@@ -1,9 +1,9 @@
 <?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" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -126,6 +126,7 @@
             </subviews>
             <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
+                <constraint firstItem="kJz-jy-Enw" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="NHk-ya-dJV"/>
                 <constraint firstItem="kJz-jy-Enw" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Yh6-BB-9g3"/>
                 <constraint firstAttribute="trailing" secondItem="kJz-jy-Enw" secondAttribute="trailing" constant="32" id="nGG-8u-ImK"/>
                 <constraint firstItem="kJz-jy-Enw" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="32" id="wiJ-hM-0Kt"/>
@@ -138,6 +139,7 @@
                 <outlet property="inputView" destination="7gT-5S-Mnm" id="cmg-Lm-Mx1"/>
                 <outlet property="starView" destination="pIM-1F-iXG" id="Ezw-4e-Vew"/>
                 <outlet property="tipsLabel" destination="4Yk-u1-WFH" id="Tbg-vh-eGE"/>
+                <outlet property="viewLeft" destination="nGG-8u-ImK" id="34N-sd-zC2"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="75.669642857142847"/>
         </view>

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -64,11 +64,12 @@
 #import "HomeTenantPageView.h"
 #import "HomeMusicSheetLayout.h"
 
-#define COLLECTION_WIDTH ((NSInteger)(KPortraitWidth * 0.83))
+#define COLLECTION_WIDTH ((NSInteger)(IS_IPAD ? KPortraitWidth * 0.7 : KPortraitWidth * 0.83))
 #define COLLECTION_HEIGHT (320)
 
 #define BUTTONWIDTH (65)
 #define BUTTONHEIGHT (70)
+
 @interface HomeViewController ()<SDCycleScrollViewDelegate,UIScrollViewDelegate,UICollectionViewDelegate, UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,TYCyclePagerViewDataSource,TYCyclePagerViewDelegate>
 
 @property (nonatomic, strong) HomeNavView *navView;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m

@@ -227,7 +227,7 @@
 
 #pragma mark ------ WMPlayer
 - (void)playVideoWithUrl:(NSString *)fileUrl {
-    fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    fileUrl = [fileUrl getUrlEndcodeString];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
     _wmPlayer = [[WMPlayer alloc] initWithFrame:_playerFrame];
     WMPlayerModel *playModel = [[WMPlayerModel alloc] init];

+ 11 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.m

@@ -8,6 +8,7 @@
 #import "GuideListView.h"
 
 @interface GuideListView ()
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageLeft;
 
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageTopConstraint;
 
@@ -30,6 +31,7 @@
         self.callback = callback;
     }
 }
+
 + (instancetype)shareInstance {
     GuideListView *view = [[[NSBundle mainBundle] loadNibNamed:@"GuideListView" owner:nil options:nil] firstObject];
     return view;
@@ -48,7 +50,15 @@
         self.imageTopConstraint.constant = 174.0f;
     }
     else {
-        self.imageTopConstraint.constant = 104.0f;
+        if (IS_IPAD) {
+            self.imageTopConstraint.constant = 220.0f;
+        }
+        else {
+            self.imageTopConstraint.constant = 104.0f;
+        }
+    }
+    if (IS_IPAD) {
+        self.imageLeft.constant = 140;
     }
 }
 

+ 4 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.xib

@@ -1,9 +1,9 @@
 <?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" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -67,7 +67,6 @@
             <constraints>
                 <constraint firstItem="40p-7F-M6I" firstAttribute="top" secondItem="5BZ-aV-ZqC" secondAttribute="bottom" constant="10" id="2v3-3C-ylP"/>
                 <constraint firstItem="V0F-XR-LOW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="EMN-a8-r6N"/>
-                <constraint firstAttribute="trailing" secondItem="yUN-KZ-L1M" secondAttribute="trailing" constant="14" id="Fzi-Wu-PNu"/>
                 <constraint firstAttribute="trailing" secondItem="V0F-XR-LOW" secondAttribute="trailing" id="OIe-Jn-wBV"/>
                 <constraint firstItem="yUN-KZ-L1M" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="174" id="Op6-Wp-jtd"/>
                 <constraint firstItem="yUN-KZ-L1M" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="XsY-jo-nmn"/>
@@ -75,6 +74,7 @@
                 <constraint firstItem="5BZ-aV-ZqC" firstAttribute="top" secondItem="yUN-KZ-L1M" secondAttribute="bottom" constant="24" id="ZEA-Cz-g9B"/>
                 <constraint firstItem="40p-7F-M6I" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="bAT-LT-afE"/>
                 <constraint firstItem="5BZ-aV-ZqC" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="fBJ-c2-scA"/>
+                <constraint firstItem="yUN-KZ-L1M" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="oHN-eC-jbe"/>
                 <constraint firstAttribute="trailing" secondItem="40p-7F-M6I" secondAttribute="trailing" constant="10" id="vgd-eT-UZy"/>
                 <constraint firstItem="ykp-ax-0bg" firstAttribute="top" secondItem="40p-7F-M6I" secondAttribute="bottom" constant="26" id="wLg-9o-nU5"/>
                 <constraint firstItem="ykp-ax-0bg" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="yvn-U5-zhs"/>
@@ -87,6 +87,7 @@
                 <outlet property="descLabel" destination="40p-7F-M6I" id="wCM-U9-TPH"/>
                 <outlet property="enterButton" destination="ykp-ax-0bg" id="zla-N1-sVW"/>
                 <outlet property="headTitle" destination="5BZ-aV-ZqC" id="83k-rz-XwT"/>
+                <outlet property="imageLeft" destination="XsY-jo-nmn" id="RHg-n5-QWu"/>
                 <outlet property="imageTopConstraint" destination="Op6-Wp-jtd" id="c46-jV-a1l"/>
                 <outlet property="imageView" destination="yUN-KZ-L1M" id="Mpv-wD-FBe"/>
             </connections>

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/VefiBodyView.m

@@ -9,6 +9,8 @@
 
 @interface VefiBodyView ()<UITextFieldDelegate>
 
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *codeViewWidth;
+
 @property (nonatomic, copy) VefiCallback callback;
 
 ///设置验证码位数 默认 6 位
@@ -23,6 +25,9 @@
 
 - (void)awakeFromNib {
     [super awakeFromNib];
+    if (IS_IPAD) {
+        self.codeViewWidth.constant = 400;
+    }
     [self config];
 }
 - (void)config {

+ 18 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/VefiBodyView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
         <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -23,6 +23,9 @@
                 </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_head" translatesAutoresizingMaskIntoConstraints="NO" id="D4i-ti-d70">
                     <rect key="frame" x="0.0" y="0.0" width="414" height="336.5"/>
+                    <constraints>
+                        <constraint firstAttribute="width" secondItem="D4i-ti-d70" secondAttribute="height" multiplier="375:305" id="Sid-39-Vqy"/>
+                    </constraints>
                 </imageView>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="back_black" translatesAutoresizingMaskIntoConstraints="NO" id="yTV-Gq-AWW">
                     <rect key="frame" x="17" y="59" width="12" height="20"/>
@@ -52,29 +55,29 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已发送6位验证码至" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ACC-QJ-tEK">
-                    <rect key="frame" x="35" y="206" width="140.5" height="19.5"/>
+                    <rect key="frame" x="35" y="206" width="144.5" height="19.5"/>
                     <fontDescription key="fontDescription" type="system" pointSize="16"/>
                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="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="QLn-uF-0pA">
-                    <rect key="frame" x="181.5" y="216" width="0.0" height="0.0"/>
+                    <rect key="frame" x="185.5" y="216" width="0.0" height="0.0"/>
                     <fontDescription key="fontDescription" type="system" pointSize="16"/>
                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="APb-fr-rES">
-                    <rect key="frame" x="42" y="255.5" width="330" height="80"/>
+                    <rect key="frame" x="47" y="255.5" width="320" height="80"/>
                     <subviews>
                         <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ecZ-di-AWs">
-                            <rect key="frame" x="0.0" y="0.0" width="330" height="80"/>
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
                             <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <color key="textColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <textInputTraits key="textInputTraits"/>
                         </textField>
                         <stackView opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="rsP-JE-rXf">
-                            <rect key="frame" x="0.0" y="0.0" width="330" height="80"/>
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
                             <subviews>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qPd-JT-IRj">
                                     <rect key="frame" x="0.0" y="20" width="38" height="40"/>
@@ -117,7 +120,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NsP-dc-Mqc">
-                                    <rect key="frame" x="58.5" y="20" width="38" height="40"/>
+                                    <rect key="frame" x="56.5" y="20" width="38" height="40"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" tag="1002" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m5R-11-XxQ">
                                             <rect key="frame" x="0.0" y="0.0" width="38" height="40"/>
@@ -157,7 +160,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dX8-IM-ogY">
-                                    <rect key="frame" x="117" y="20" width="38" height="40"/>
+                                    <rect key="frame" x="113" y="20" width="38" height="40"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" tag="1003" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xKi-If-kn0">
                                             <rect key="frame" x="0.0" y="0.0" width="38" height="40"/>
@@ -197,7 +200,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IwE-wJ-SdW">
-                                    <rect key="frame" x="175" y="20" width="38" height="40"/>
+                                    <rect key="frame" x="169" y="20" width="38" height="40"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" tag="1004" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xqX-5L-OmT">
                                             <rect key="frame" x="0.0" y="0.0" width="38" height="40"/>
@@ -237,7 +240,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c7p-XH-121">
-                                    <rect key="frame" x="233.5" y="20" width="38" height="40"/>
+                                    <rect key="frame" x="225.5" y="20" width="38" height="40"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" tag="1005" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yBI-JY-iGJ">
                                             <rect key="frame" x="0.0" y="0.0" width="38" height="40"/>
@@ -277,7 +280,7 @@
                                     </userDefinedRuntimeAttributes>
                                 </view>
                                 <view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oIi-0Z-NDh">
-                                    <rect key="frame" x="292" y="20" width="38" height="40"/>
+                                    <rect key="frame" x="282" y="20" width="38" height="40"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" tag="1006" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TgR-sX-cLq">
                                             <rect key="frame" x="0.0" y="0.0" width="38" height="40"/>
@@ -339,6 +342,7 @@
                         <constraint firstAttribute="trailing" secondItem="ecZ-di-AWs" secondAttribute="trailing" id="Ra9-er-skF"/>
                         <constraint firstItem="ecZ-di-AWs" firstAttribute="leading" secondItem="APb-fr-rES" secondAttribute="leading" id="UuU-VV-4fH"/>
                         <constraint firstAttribute="bottom" secondItem="rsP-JE-rXf" secondAttribute="bottom" id="hGV-iM-LGh"/>
+                        <constraint firstAttribute="width" constant="320" id="ptv-pL-gBT"/>
                         <constraint firstItem="ecZ-di-AWs" firstAttribute="top" secondItem="APb-fr-rES" secondAttribute="top" id="uff-TA-lcU"/>
                     </constraints>
                 </view>
@@ -371,10 +375,8 @@
                 <constraint firstItem="N0p-t8-Ync" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="DI5-5e-fVc"/>
                 <constraint firstItem="ACC-QJ-tEK" firstAttribute="leading" secondItem="8pp-v2-csB" secondAttribute="leading" id="Eul-X9-cbW"/>
                 <constraint firstAttribute="trailing" secondItem="N0p-t8-Ync" secondAttribute="trailing" id="I9u-dZ-Lji"/>
-                <constraint firstItem="APb-fr-rES" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="42" id="N9F-NY-6MA"/>
                 <constraint firstItem="t6R-nu-bBh" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="NAW-Ta-nYI"/>
                 <constraint firstItem="QLn-uF-0pA" firstAttribute="centerY" secondItem="ACC-QJ-tEK" secondAttribute="centerY" id="RGf-uR-Xb1"/>
-                <constraint firstItem="D4i-ti-d70" firstAttribute="width" secondItem="D4i-ti-d70" secondAttribute="height" multiplier="375:305" id="Sid-39-Vqy"/>
                 <constraint firstItem="D4i-ti-d70" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="X3l-Nh-qsc"/>
                 <constraint firstItem="8pp-v2-csB" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="35" id="Zdg-6H-P9H"/>
                 <constraint firstAttribute="trailing" secondItem="D4i-ti-d70" secondAttribute="trailing" id="Zqo-dx-oIu"/>
@@ -384,8 +386,8 @@
                 <constraint firstItem="h3s-bI-j5B" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="imv-0J-7lZ"/>
                 <constraint firstItem="t6R-nu-bBh" firstAttribute="top" secondItem="APb-fr-rES" secondAttribute="bottom" constant="30" id="l43-O2-aNN"/>
                 <constraint firstItem="APb-fr-rES" firstAttribute="top" secondItem="ACC-QJ-tEK" secondAttribute="bottom" constant="30" id="mrY-Wz-yVi"/>
-                <constraint firstAttribute="trailing" secondItem="APb-fr-rES" secondAttribute="trailing" constant="42" id="mtR-HL-TYC"/>
                 <constraint firstAttribute="bottom" secondItem="N0p-t8-Ync" secondAttribute="bottom" id="nUf-4H-kig"/>
+                <constraint firstItem="APb-fr-rES" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="sxC-My-2aw"/>
                 <constraint firstItem="8pp-v2-csB" firstAttribute="top" secondItem="h3s-bI-j5B" secondAttribute="bottom" constant="65" id="tBO-2A-yYB"/>
                 <constraint firstItem="ACC-QJ-tEK" firstAttribute="top" secondItem="8pp-v2-csB" secondAttribute="bottom" constant="15" id="yVZ-gV-TBm"/>
             </constraints>
@@ -394,6 +396,7 @@
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
                 <outlet property="backField" destination="ecZ-di-AWs" id="PvK-vs-hSx"/>
+                <outlet property="codeViewWidth" destination="ptv-pL-gBT" id="dEQ-tW-tna"/>
                 <outlet property="phoneText" destination="QLn-uF-0pA" id="MEj-6V-KeS"/>
                 <outlet property="vefiButton" destination="t6R-nu-bBh" id="mcL-4l-YOX"/>
             </connections>

+ 3 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/InstrumentChooseViewController.m

@@ -11,6 +11,8 @@
 #import "InstrumentChooseBottonView.h"
 #import "InstrumentHeaderView.h"
 
+#define INSTRUMENT_ROWCOUNT (IS_IPAD ? 5 : 3)
+
 @interface InstrumentChooseViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
 
 @property (nonatomic, copy) ChooseInstrumentCallback callback;
@@ -66,14 +68,6 @@
         make.height.mas_equalTo(36.0f);
     }];
     
-    
-    CAGradientLayer * gradientLayer = [CAGradientLayer layer];
-    gradientLayer.colors = @[(__bridge id)HexRGB(0xFFF6EE).CGColor,(__bridge id)HexRGB(0xFFECDD).CGColor];
-    gradientLayer.startPoint = CGPointMake(0.04, 0);
-    gradientLayer.endPoint = CGPointMake(0.97, 1.07);
-    gradientLayer.frame = CGRectMake(0, 0, kScreenWidth - 28, 36);
-    gradientLayer.locations = @[@(0),@(1)];
-    [headView.layer addSublayer:gradientLayer];
     headView.layer.cornerRadius = 10.0f;
     headView.layer.masksToBounds = YES;
     
@@ -276,7 +270,7 @@
 - (UICollectionView *)collectionView {
     if (!_collectionView) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-        CGFloat width = (NSInteger)((KPortraitWidth - 15 * 2 - 20) / 3);
+        CGFloat width = (NSInteger)((KPortraitWidth - 15 * 2 - (INSTRUMENT_ROWCOUNT-1)* 10) / INSTRUMENT_ROWCOUNT);
         CGFloat height = width;
         layout.itemSize = CGSizeMake(width, height);
         layout.headerReferenceSize = CGSizeMake(kScreen_Width - 30, 40);

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

@@ -502,7 +502,7 @@
 
 #pragma mark ------ WMPlayer
 - (void)playVideoWithUrl:(NSString *)fileUrl {
-    fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    fileUrl = [fileUrl getUrlEndcodeString];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
     _wmPlayer = [[WMPlayer alloc] initWithFrame:_playerFrame];
     WMPlayerModel *playModel = [[WMPlayerModel alloc] init];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveList/View/LiveListBodyView.m

@@ -305,7 +305,7 @@
 
 #pragma mark ------ WMPlayer
 - (void)playVideoWithUrl:(NSString *)fileUrl {
-    fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    fileUrl = [fileUrl getUrlEndcodeString];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
     _wmPlayer = [[WMPlayer alloc] initWithFrame:_playerFrame];
     WMPlayerModel *playModel = [[WMPlayerModel alloc] init];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMienBodyView.m

@@ -339,7 +339,7 @@
 
 #pragma mark ------ WMPlayer
 - (void)playVideoWithUrl:(NSString *)fileUrl {
-    fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+    fileUrl = [fileUrl getUrlEndcodeString];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
     _wmPlayer = [[WMPlayer alloc] initWithFrame:_playerFrame];
     WMPlayerModel *playModel = [[WMPlayerModel alloc] init];

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/VeriCheckView.m

@@ -36,25 +36,25 @@
 + (instancetype)shareInstanceShowInView:(UIView *)mountView {
     
     CGFloat viewHeight = CGRectGetHeight(mountView.bounds);
-    CGFloat yPosition = viewHeight < kScreen_Height ? kNaviBarHeight : 0;
-    VeriCheckView *checkView = [[VeriCheckView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, viewHeight)];
+    CGFloat yPosition = viewHeight < KPortraitHeight ? kNaviBarHeight : 0;
+    VeriCheckView *checkView = [[VeriCheckView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, viewHeight)];
     checkView.mountView = mountView;
-    checkView.backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, viewHeight)];
+    checkView.backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, viewHeight)];
     checkView.backView.backgroundColor = HexRGBAlpha(0x000000, 0.5f);
     [checkView addSubview:checkView.backView];
     // 手势
     UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:checkView action:@selector(tapAction:)];
     tapGesture.delegate = checkView;
     [checkView.backView addGestureRecognizer:tapGesture];
-
+    CGFloat viewWidth = 300.0f;
     // display view
-    checkView.displayView = [[UIView alloc] initWithFrame:CGRectMake(20, (viewHeight - 166 - yPosition) / 2.0f, kScreen_Width - 40, 166)];
+    checkView.displayView = [[UIView alloc] initWithFrame:CGRectMake((KPortraitWidth - viewWidth)/2, (viewHeight - 166 - yPosition) / 2.0f, viewWidth, 166)];
     checkView.displayView.backgroundColor = [UIColor whiteColor];
     checkView.displayView.layer.cornerRadius = 5.0f;
     [checkView addSubview:checkView.displayView];
     
     UIButton *cancleButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    cancleButton.frame = CGRectMake(kScreen_Width - 25 - 20, CGRectGetMinY(checkView.displayView.frame) - 25 - 12, 25, 25);
+    cancleButton.frame = CGRectMake(CGRectGetMaxX(checkView.displayView.frame) - 25, CGRectGetMinY(checkView.displayView.frame) - 25 - 12, 25, 25);
     [cancleButton setImage:[UIImage imageNamed:@"cancleButton"] forState:UIControlStateNormal];
     [cancleButton addTarget:checkView action:@selector(hiddView) forControlEvents:UIControlEventTouchUpInside];
     [checkView addSubview:cancleButton];
@@ -62,7 +62,7 @@
     
     
     // titleLabel
-    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, kScreen_Width - 40, 22)];
+    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, viewWidth, 22)];
     [titleLabel setText:@"输入图片验证码"];
     [titleLabel setTextColor:HexRGB(0x4f4f4f)];
     [titleLabel setFont:[UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium]];

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Works/Controller/MineWorksViewController.m

@@ -38,8 +38,9 @@
 - (void)configUI {
     self.ks_prefersNavigationBarHidden = YES;
     [self.scrollView removeFromSuperview];
-    
-    UIImage *bgImage = [UIImage imageNamed:@"mineWorks_bg"];
+    NSString *bgName = IS_IPAD ? @"mineWorks_bgPad" : @"mineWorks_bg";
+
+    UIImage *bgImage = [UIImage imageNamed:bgName];
     NSInteger height = (NSInteger)(bgImage.size.height / bgImage.size.width * KPortraitWidth);
     UIImageView *imageView = [[UIImageView alloc] initWithImage:bgImage];
     imageView.frame = CGRectMake(0, 0, KPortraitWidth, height);