Ver código fonte

ninggege。提交了新的 CRUD. 添加OC混编 , 桥接文件。

openlockPPP 1 ano atrás
pai
commit
db9f994333
45 arquivos alterados com 473 adições e 19 exclusões
  1. 56 0
      JSJP_Student_sw.xcodeproj/project.pbxproj
  2. BIN
      JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner.png
  3. BIN
      JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner@2x.png
  4. BIN
      JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner@3x.png
  5. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/Contents.json
  6. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰.png
  7. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰@2x.png
  8. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰@3x.png
  9. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/Contents.json
  10. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝.png
  11. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝@2x.png
  12. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝@3x.png
  13. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/Contents.json
  14. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰.png
  15. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰@2x.png
  16. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰@3x.png
  17. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/Contents.json
  18. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝.png
  19. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝@2x.png
  20. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝@3x.png
  21. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/Contents.json
  22. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰.png
  23. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰@2x.png
  24. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰@3x.png
  25. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/Contents.json
  26. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝.png
  27. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝@2x.png
  28. 0 0
      JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝@3x.png
  29. 13 0
      JSJP_Student_sw/JSJP-Brigding-Header.h
  30. 3 0
      JSJP_Student_sw/Sources/AppDelegate.swift
  31. 4 8
      JSJP_Student_sw/Sources/Constants/NYImage.swift
  32. 2 2
      JSJP_Student_sw/Sources/Main/MainNavigationController.swift
  33. 5 5
      JSJP_Student_sw/Sources/Main/MainTabBarController.swift
  34. 3 2
      JSJP_Student_sw/Sources/Modulars/Home/Controllers/HomeParentViewController.swift
  35. 8 0
      JSJP_Student_sw/Sources/Modulars/Home/Views/HomeNavBar.swift
  36. 18 0
      JSJP_Student_sw/Sources/Modulars/Home/Views/HomeNavBar.xib
  37. 2 0
      JSJP_Student_sw/Sources/Modulars/Mine/Controllers/MineParentViewController.swift
  38. 3 2
      JSJP_Student_sw/Sources/Modulars/Timekeep/Controllers/TimeKeepParentViewController.swift
  39. 28 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayout.h
  40. 38 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayout.m
  41. 14 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayoutDefine.h
  42. 13 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UILabel+GJRatioAutoLayout.h
  43. 79 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UILabel+GJRatioAutoLayout.m
  44. 20 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UIView+GJRatioAutoLayout.h
  45. 164 0
      JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UIView+GJRatioAutoLayout.m

+ 56 - 0
JSJP_Student_sw.xcodeproj/project.pbxproj

@@ -28,6 +28,11 @@
 		90A64BC12A25E1CF00D8BED6 /* TogetherDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BC02A25E1CF00D8BED6 /* TogetherDataManager.swift */; };
 		90A64BC82A25E98C00D8BED6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90A64BC62A25E98B00D8BED6 /* Main.storyboard */; };
 		90A64BC92A25E98C00D8BED6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BC72A25E98C00D8BED6 /* ViewController.swift */; };
+		90A64BCC2A2603CB00D8BED6 /* HomeNavBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BCB2A2603CB00D8BED6 /* HomeNavBar.swift */; };
+		90A64BCE2A2603DD00D8BED6 /* HomeNavBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90A64BCD2A2603DD00D8BED6 /* HomeNavBar.xib */; };
+		90A64BD82A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BD12A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.m */; };
+		90A64BD92A2604F600D8BED6 /* GJRatioAutoLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BD62A2604F600D8BED6 /* GJRatioAutoLayout.m */; };
+		90A64BDA2A2604F600D8BED6 /* UIView+GJRatioAutoLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A64BD72A2604F600D8BED6 /* UIView+GJRatioAutoLayout.m */; };
 		B204266C2A1B0E50009FAC45 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B204266B2A1B0E50009FAC45 /* AppDelegate.swift */; };
 		B20426752A1B0E52009FAC45 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B20426742A1B0E52009FAC45 /* Assets.xcassets */; };
 		B20426782A1B0E52009FAC45 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B20426762A1B0E52009FAC45 /* LaunchScreen.storyboard */; };
@@ -130,6 +135,16 @@
 		90A64BC02A25E1CF00D8BED6 /* TogetherDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TogetherDataManager.swift; sourceTree = "<group>"; };
 		90A64BC62A25E98B00D8BED6 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
 		90A64BC72A25E98C00D8BED6 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
+		90A64BCB2A2603CB00D8BED6 /* HomeNavBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeNavBar.swift; sourceTree = "<group>"; };
+		90A64BCD2A2603DD00D8BED6 /* HomeNavBar.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeNavBar.xib; sourceTree = "<group>"; };
+		90A64BD12A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+GJRatioAutoLayout.m"; sourceTree = "<group>"; };
+		90A64BD22A2604F600D8BED6 /* GJRatioAutoLayoutDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJRatioAutoLayoutDefine.h; sourceTree = "<group>"; };
+		90A64BD32A2604F600D8BED6 /* GJRatioAutoLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GJRatioAutoLayout.h; sourceTree = "<group>"; };
+		90A64BD42A2604F600D8BED6 /* UIView+GJRatioAutoLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+GJRatioAutoLayout.h"; sourceTree = "<group>"; };
+		90A64BD52A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+GJRatioAutoLayout.h"; sourceTree = "<group>"; };
+		90A64BD62A2604F600D8BED6 /* GJRatioAutoLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GJRatioAutoLayout.m; sourceTree = "<group>"; };
+		90A64BD72A2604F600D8BED6 /* UIView+GJRatioAutoLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+GJRatioAutoLayout.m"; sourceTree = "<group>"; };
+		90A64BDB2A2605C500D8BED6 /* JSJP-Brigding-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JSJP-Brigding-Header.h"; sourceTree = "<group>"; };
 		B20426682A1B0E50009FAC45 /* JSJP_Student_sw.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSJP_Student_sw.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		B204266B2A1B0E50009FAC45 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		B20426742A1B0E52009FAC45 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -293,6 +308,7 @@
 		90A64BA92A25C28A00D8BED6 /* Home */ = {
 			isa = PBXGroup;
 			children = (
+				90A64BCA2A2603A300D8BED6 /* Views */,
 				90A64BAB2A25C2BE00D8BED6 /* Controllers */,
 				90A64BAA2A25C2B100D8BED6 /* Helper */,
 			);
@@ -348,6 +364,37 @@
 			path = Controllers;
 			sourceTree = "<group>";
 		};
+		90A64BCA2A2603A300D8BED6 /* Views */ = {
+			isa = PBXGroup;
+			children = (
+				90A64BCB2A2603CB00D8BED6 /* HomeNavBar.swift */,
+				90A64BCD2A2603DD00D8BED6 /* HomeNavBar.xib */,
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
+		90A64BCF2A2604DC00D8BED6 /* Thirdparty */ = {
+			isa = PBXGroup;
+			children = (
+				90A64BD02A2604F600D8BED6 /* GJRatioAutoLayout */,
+			);
+			path = Thirdparty;
+			sourceTree = "<group>";
+		};
+		90A64BD02A2604F600D8BED6 /* GJRatioAutoLayout */ = {
+			isa = PBXGroup;
+			children = (
+				90A64BD52A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.h */,
+				90A64BD12A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.m */,
+				90A64BD22A2604F600D8BED6 /* GJRatioAutoLayoutDefine.h */,
+				90A64BD32A2604F600D8BED6 /* GJRatioAutoLayout.h */,
+				90A64BD62A2604F600D8BED6 /* GJRatioAutoLayout.m */,
+				90A64BD42A2604F600D8BED6 /* UIView+GJRatioAutoLayout.h */,
+				90A64BD72A2604F600D8BED6 /* UIView+GJRatioAutoLayout.m */,
+			);
+			path = GJRatioAutoLayout;
+			sourceTree = "<group>";
+		};
 		B204265F2A1B0E50009FAC45 = {
 			isa = PBXGroup;
 			children = (
@@ -375,6 +422,7 @@
 				90A64BC62A25E98B00D8BED6 /* Main.storyboard */,
 				90A64BC72A25E98C00D8BED6 /* ViewController.swift */,
 				B20426792A1B0E52009FAC45 /* Info.plist */,
+				90A64BDB2A2605C500D8BED6 /* JSJP-Brigding-Header.h */,
 			);
 			path = JSJP_Student_sw;
 			sourceTree = "<group>";
@@ -382,6 +430,7 @@
 		B204269B2A1B4576009FAC45 /* Sources */ = {
 			isa = PBXGroup;
 			children = (
+				90A64BCF2A2604DC00D8BED6 /* Thirdparty */,
 				90A64BA12A25BCAD00D8BED6 /* New Group */,
 				90A64B9D2A25A9D000D8BED6 /* Modulars */,
 				90A64B9C2A25A9BE00D8BED6 /* Models */,
@@ -729,6 +778,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				90A64BCE2A2603DD00D8BED6 /* HomeNavBar.xib in Resources */,
 				B20427242A1B4ED2009FAC45 /* SearchBarView.xib in Resources */,
 				B20426782A1B0E52009FAC45 /* LaunchScreen.storyboard in Resources */,
 				B20427302A1B4ED2009FAC45 /* PopOverViewCell.xib in Resources */,
@@ -793,6 +843,7 @@
 				B204273F2A1B5691009FAC45 /* NYFont.swift in Sources */,
 				B20427322A1B4ED2009FAC45 /* Action.swift in Sources */,
 				B20426B12A1B4738009FAC45 /* UICollectionView+Rx.swift in Sources */,
+				90A64BD82A2604F600D8BED6 /* UILabel+GJRatioAutoLayout.m in Sources */,
 				B20426D52A1B4DB6009FAC45 /* UIScrollView+ScrollToBottom.swift in Sources */,
 				B20426B32A1B4738009FAC45 /* Logger.swift in Sources */,
 				B20426CF2A1B4DB6009FAC45 /* UIScrollView+Direction.swift in Sources */,
@@ -821,6 +872,7 @@
 				B20426D22A1B4DB6009FAC45 /* UIViewController+NetAnimation.swift in Sources */,
 				90A64BC12A25E1CF00D8BED6 /* TogetherDataManager.swift in Sources */,
 				B20427312A1B4ED2009FAC45 /* PopOverViewSettings.swift in Sources */,
+				90A64BCC2A2603CB00D8BED6 /* HomeNavBar.swift in Sources */,
 				B20426AE2A1B4738009FAC45 /* NotificationCenter+Rx.swift in Sources */,
 				B20426AC2A1B4738009FAC45 /* UIScrollView+Rx.swift in Sources */,
 				B20426D32A1B4DB6009FAC45 /* Array+SectionModel.swift in Sources */,
@@ -835,6 +887,7 @@
 				B20427232A1B4ED2009FAC45 /* SearchBarView.swift in Sources */,
 				B204272F2A1B4ED2009FAC45 /* PopOverViewCell.swift in Sources */,
 				B204271C2A1B4ED2009FAC45 /* NibLoadable.swift in Sources */,
+				90A64BDA2A2604F600D8BED6 /* UIView+GJRatioAutoLayout.m in Sources */,
 				B20427342A1B5167009FAC45 /* CompositionRoot.swift in Sources */,
 				B20427382A1B549F009FAC45 /* RequestError.swift in Sources */,
 				B204272E2A1B4ED2009FAC45 /* PopOverView.swift in Sources */,
@@ -856,6 +909,7 @@
 				B20426D62A1B4DB6009FAC45 /* UIColor+Bilibili.swift in Sources */,
 				B204273A2A1B558F009FAC45 /* NYAppCongfigure.swift in Sources */,
 				B20427152A1B4ED2009FAC45 /* Timer+LWPlayer.swift in Sources */,
+				90A64BD92A2604F600D8BED6 /* GJRatioAutoLayout.m in Sources */,
 				B20426CA2A1B4DB6009FAC45 /* UIImageView+Kingfisher.swift in Sources */,
 				90A64BBF2A25DFDB00D8BED6 /* MainTabBarViewReactor.swift in Sources */,
 				B204271B2A1B4ED2009FAC45 /* NetAnimationLoadable.swift in Sources */,
@@ -1024,6 +1078,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "zhongZhengJpsw.com.JSJP-Student-sw";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_OBJC_BRIDGING_HEADER = "${SRCROOT}/JSJP_Student_sw/JSJP-Brigding-Header.h";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
 			};
@@ -1055,6 +1110,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = "zhongZhengJpsw.com.JSJP-Student-sw";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_OBJC_BRIDGING_HEADER = "${SRCROOT}/JSJP_Student_sw/JSJP-Brigding-Header.h";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
 			};

BIN
JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner.png


BIN
JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner@2x.png


BIN
JSJP_Student_sw/Assets.xcassets/Launch/launch_splash.imageset/launcher_default_inner@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试灰.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试灰.imageset/考试灰.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试灰.imageset/考试灰@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试灰.imageset/考试灰@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam.imageset/考试灰@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试蓝.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试蓝.imageset/考试蓝.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试蓝.imageset/考试蓝@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/考试蓝.imageset/考试蓝@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_exam_s.imageset/考试蓝@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的灰.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的灰.imageset/我的灰.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的灰.imageset/我的灰@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的灰.imageset/我的灰@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine.imageset/我的灰@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的蓝.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的蓝.imageset/我的蓝.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的蓝.imageset/我的蓝@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/我的蓝.imageset/我的蓝@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_mine_s.imageset/我的蓝@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时灰.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时灰.imageset/计时灰.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时灰.imageset/计时灰@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时灰.imageset/计时灰@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer.imageset/计时灰@3x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时蓝.imageset/Contents.json → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/Contents.json


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时蓝.imageset/计时蓝.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时蓝.imageset/计时蓝@2x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝@2x.png


+ 0 - 0
JSJP_Student_sw/Assets.xcassets/Modules/MainModule/计时蓝.imageset/计时蓝@3x.png → JSJP_Student_sw/Assets.xcassets/Modules/MainModule/tabBar_timer_s.imageset/计时蓝@3x.png


+ 13 - 0
JSJP_Student_sw/JSJP-Brigding-Header.h

@@ -0,0 +1,13 @@
+//
+//  JSJP-Brigding-Header.h
+//  JSJP_Student_sw
+//
+//  Created by Ning.ge on 2023/5/30.
+//
+
+#ifndef JSJP_Brigding_Header_h
+#define JSJP_Brigding_Header_h
+
+#import "GJRatioAutoLayout.h"
+
+#endif /* JSJP_Brigding_Header_h */

+ 3 - 0
JSJP_Student_sw/Sources/AppDelegate.swift

@@ -20,6 +20,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         
+        //配置全局GJRatioAutoLayout
+        GJRatioAutoLayout.start(with: GJScreenSizeType.typeiPhone6)
+        
         self.dependency = self.dependency ?? CompositionRoot.resolve()
         self.window = self.dependency.window
         self.dependency.configureSDKs()

+ 4 - 8
JSJP_Student_sw/Sources/Constants/NYImage.swift

@@ -14,14 +14,10 @@ struct NYImage {
         static let background = UIImage(named: "launch_background")
     }
     struct TabBar {
-        static let home = UIImage(named: "tabBar_home")
-        static let home_s = UIImage(named: "tabBar_home_s")
-        static let attention =  UIImage(named: "tabBar_attention")
-        static let attention_s = UIImage(named: "tabBar_attention_s")
-        static let category = UIImage(named: "tabBar_category")
-        static let category_s = UIImage(named: "tabBar_category_s")
-        static let discovery = UIImage(named: "tabBar_discovery")
-        static let discovery_s = UIImage(named: "tabBar_discovery_s")
+        static let home = UIImage(named: "tabBar_exam")
+        static let home_s = UIImage(named: "tabBar_exam_s")
+        static let timeKeep =  UIImage(named: "tabBar_timer")
+        static let timeKeep_s = UIImage(named: "tabBar_timer_s")
         static let mine = UIImage(named: "tabBar_mine")
         static let mine_s = UIImage(named: "tabBar_mine_s")
     }

+ 2 - 2
JSJP_Student_sw/Sources/Main/MainNavigationController.swift

@@ -16,9 +16,9 @@ final class MainNavigationController: UINavigationController {
         
         self.interactivePopGestureRecognizer?.delegate = self
         
-        self.navigationBar.setBackgroundImage(UIImage.size(CGSize(width: 1, height: 1)).color(UIColor.db_pink).image, for: .default)
+        self.navigationBar.setBackgroundImage(UIImage.size(CGSize(width: 1, height: 1)).color(UIColor.white).image, for: .default)
         
-        self.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.db_white]
+        self.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.db_lightBlack]
        
     }
     

+ 5 - 5
JSJP_Student_sw/Sources/Main/MainTabBarController.swift

@@ -17,7 +17,7 @@ final class MainTabBarController: UITabBarController, View {
     // MARK: Constants
     
     fileprivate struct Metric {
-        static let tabBarHeight = 44.f
+        static let tabBarHeight = 50.f
     }
     
     // MARK: Properties
@@ -37,10 +37,9 @@ final class MainTabBarController: UITabBarController, View {
                                 mineListViewController]
             .map{ (viewController) -> UINavigationController in
                 let navigationController = MainNavigationController(rootViewController: viewController)
-                navigationController.tabBarItem.title = nil
-                navigationController.tabBarItem.imageInsets.top = 5
-                navigationController.tabBarItem.imageInsets.bottom = -5
-
+//                navigationController.tabBarItem.imageInsets.top = 5
+//                navigationController.tabBarItem.imageInsets.bottom = 5
+                navigationController.tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3)
                 return navigationController
              }
         self.tabBar.barTintColor = .db_white
@@ -81,3 +80,4 @@ final class MainTabBarController: UITabBarController, View {
         self.tabBar.bottom = self.view.height
     }
 }
+

+ 3 - 2
JSJP_Student_sw/Sources/Modulars/Home/Controllers/HomeParentViewController.swift

@@ -10,8 +10,9 @@ final class HomeParentViewController: BaseViewController {
     override init() {
         super.init()
         
-        self.tabBarItem.image = NYImage.TabBar.mine
-        self.tabBarItem.selectedImage = NYImage.TabBar.mine_s?.withRenderingMode(.alwaysOriginal)
+        self.title = "考试"
+        self.tabBarItem.image = NYImage.TabBar.home
+        self.tabBarItem.selectedImage = NYImage.TabBar.home_s?.withRenderingMode(.alwaysOriginal)
     }
     
     override func viewDidLoad() {

+ 8 - 0
JSJP_Student_sw/Sources/Modulars/Home/Views/HomeNavBar.swift

@@ -0,0 +1,8 @@
+//
+//  HomeNavBar.swift
+//  JSJP_Student_sw
+//
+//  Created by Ning.ge on 2023/5/30.
+//
+
+import Foundation

+ 18 - 0
JSJP_Student_sw/Sources/Modulars/Home/Views/HomeNavBar.xib

@@ -0,0 +1,18 @@
+<?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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
+        </view>
+    </objects>
+</document>

+ 2 - 0
JSJP_Student_sw/Sources/Modulars/Mine/Controllers/MineParentViewController.swift

@@ -12,8 +12,10 @@ final class MineParentViewController: BaseViewController {
     override init() {
         super.init()
         
+        self.title = "我的"
         self.tabBarItem.image = NYImage.TabBar.mine
         self.tabBarItem.selectedImage = NYImage.TabBar.mine_s?.withRenderingMode(.alwaysOriginal)
+
     }
     
     override func viewDidLoad() {

+ 3 - 2
JSJP_Student_sw/Sources/Modulars/Timekeep/Controllers/TimeKeepParentViewController.swift

@@ -12,8 +12,9 @@ final class TimeKeepParentViewController: BaseViewController {
     override init() {
         super.init()
         
-        self.tabBarItem.image = NYImage.TabBar.mine
-        self.tabBarItem.selectedImage = NYImage.TabBar.mine_s?.withRenderingMode(.alwaysOriginal)
+        self.title = "计时"
+        self.tabBarItem.image = NYImage.TabBar.timeKeep
+        self.tabBarItem.selectedImage = NYImage.TabBar.timeKeep_s?.withRenderingMode(.alwaysOriginal)
     }
     
     override func viewDidLoad() {

+ 28 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayout.h

@@ -0,0 +1,28 @@
+//
+//  GJRatioAutoLayout.h
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 16/1/3.
+//  Copyright © 2016年 wangyutao. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "GJRatioAutoLayoutDefine.h"
+#import "UIView+GJRatioAutoLayout.h"
+#import "UILabel+GJRatioAutoLayout.h"
+
+typedef NS_ENUM(NSUInteger, GJScreenSizeType) {
+    GJScreenSizeTypeiPhone4or5,
+    GJScreenSizeTypeiPhone6,
+    GJScreenSizeTypeiPhone6Plus,
+};
+
+@interface GJRatioAutoLayout : NSObject
+
++ (void)startWithScreenSizeType:(GJScreenSizeType)type;
+
++ (GJScreenSizeType)getScreenSizeType;
+
++ (NSInteger)getScreenSizeWidth;
+
+@end

+ 38 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayout.m

@@ -0,0 +1,38 @@
+//
+//  GJRatioAutoLayout.m
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 16/1/3.
+//  Copyright © 2016年 wangyutao. All rights reserved.
+//
+
+#import "GJRatioAutoLayout.h"
+
+static GJScreenSizeType screenSizeType = GJScreenSizeTypeiPhone4or5;
+
+@implementation GJRatioAutoLayout
+
++ (void)startWithScreenSizeType:(GJScreenSizeType)type {
+    screenSizeType = type;
+}
+
++ (GJScreenSizeType)getScreenSizeType {
+    return screenSizeType;
+}
+
++ (NSInteger)getScreenSizeWidth {
+    switch (screenSizeType) {
+        case GJScreenSizeTypeiPhone4or5:
+            return 320;
+            break;
+        case GJScreenSizeTypeiPhone6:
+            return 375;
+        case GJScreenSizeTypeiPhone6Plus:
+            return 414;
+        default:
+            break;
+    }
+    return 320;
+}
+
+@end

+ 14 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/GJRatioAutoLayoutDefine.h

@@ -0,0 +1,14 @@
+//
+//  GJRatioAutoLaoutDefine.h
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 15/12/30.
+//  Copyright © 2015年 wangyutao. All rights reserved.
+//
+
+#import "GJRatioAutoLayout.h"
+
+#define GJ_MainScreen                   [UIScreen mainScreen]
+#define GJ_ScreenW                      (GJ_MainScreen.bounds.size.width)
+#define GJ_BaseW                        [GJRatioAutoLayout getScreenSizeWidth]
+#define GJ_Scale                        (GJ_ScreenW/GJ_BaseW)

+ 13 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UILabel+GJRatioAutoLayout.h

@@ -0,0 +1,13 @@
+//
+//  UILabel+GJRatioAutoLayout.h
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 15/12/30.
+//  Copyright © 2015年 wangyutao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UILabel (GJRatioAutoLayout)
+
+@end

+ 79 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UILabel+GJRatioAutoLayout.m

@@ -0,0 +1,79 @@
+//
+//  UILabel+GJRatioAutoLayout.m
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 15/12/30.
+//  Copyright © 2015年 wangyutao. All rights reserved.
+//
+
+#import "UILabel+GJRatioAutoLayout.h"
+#import "UIView+GJRatioAutoLayout.h"
+#import "GJRatioAutoLayoutDefine.h"
+#import <objc/runtime.h>
+
+@interface UILabel (_GJRatioAutoLayoutStroge)
+@property (nonatomic, assign) CGFloat gj_originalFontSize;
+@end
+
+@implementation UILabel (_GJRatioAutoLayoutStroge)
+
+- (void)setGj_originalFontSize:(CGFloat)originalFontSize {
+    objc_setAssociatedObject(self, @selector(gj_originalFontSize), @(originalFontSize), OBJC_ASSOCIATION_RETAIN);
+}
+
+- (CGFloat)gj_originalFontSize {
+#if CGFLOAT_IS_DOUBLE
+    return [objc_getAssociatedObject(self, _cmd) doubleValue];
+#else
+    return [objc_getAssociatedObject(self, _cmd) floatValue];
+#endif
+}
+
+@end
+
+@implementation UILabel (GJRatioAutoLayout)
+
++ (void)load {
+    GJExchangeImplementations(self, @selector(setPreferredMaxLayoutWidth:), @selector(gj_setPreferredMaxLayoutWidth:));
+}
+
+#pragma mark- aLRatio rewrite
+- (void)setALRatio:(BOOL)aLRatio {
+    if (self.gj_aLRatio == aLRatio) return;
+    [super setALRatio:aLRatio];
+    //reset only when changed
+    [self resetFont];
+    [self resetPreferredMaxLayoutWidth];
+}
+
+
+#pragma mark - preferredMaxLayoutWidth
+//scaled when user set by code.
+- (void)gj_setPreferredMaxLayoutWidth:(CGFloat)width {
+    CGFloat maxWidth = width;
+    if (self.gj_aLRatio && maxWidth > 0) {
+        maxWidth *= GJ_Scale;
+    }
+    [self gj_setPreferredMaxLayoutWidth:maxWidth];
+}
+
+#pragma mark- private method
+- (void)resetFont {
+    if (self.gj_aLRatio) {
+        self.gj_originalFontSize = self.font.pointSize;
+        CGFloat size = floorl(self.font.pointSize * GJ_Scale);
+        NSString *name = self.font.fontName;
+        self.font = [UIFont fontWithName:name size:size];
+    }
+    else {
+        self.font = [UIFont fontWithName:self.font.fontName size:self.gj_originalFontSize];
+    }
+}
+
+- (void)resetPreferredMaxLayoutWidth {
+    if (self.gj_aLRatio && self.preferredMaxLayoutWidth > 0) {
+        [self gj_setPreferredMaxLayoutWidth:self.preferredMaxLayoutWidth * GJ_Scale];
+    }
+}
+
+@end

+ 20 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UIView+GJRatioAutoLayout.h

@@ -0,0 +1,20 @@
+//
+//  UIView+GJRatioAutoLayout.h
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 15/12/30.
+//  Copyright © 2015年 wangyutao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+void GJExchangeImplementations(Class class, SEL newSelector, SEL oldSelector);
+
+@interface UIView (GJRatioAutoLayout)
+
+/**
+ *  set scaled open for view.
+ */
+@property (nonatomic, assign, getter=gj_aLRatio) IBInspectable BOOL aLRatio;
+
+@end

+ 164 - 0
JSJP_Student_sw/Sources/Thirdparty/GJRatioAutoLayout/UIView+GJRatioAutoLayout.m

@@ -0,0 +1,164 @@
+//
+//  UIView+GJRatioAutoLayout.m
+//  GJRatioAutoLayout
+//
+//  Created by wangyutao on 15/12/30.
+//  Copyright © 2015年 wangyutao. All rights reserved.
+//
+
+#import "UIView+GJRatioAutoLayout.h"
+#import "GJRatioAutoLayoutDefine.h"
+#import <objc/runtime.h>
+
+void GJExchangeImplementations(Class class, SEL newSelector, SEL oldSelector) {
+    Method oldMethod = class_getInstanceMethod(class, newSelector);
+    Method newMethod = class_getInstanceMethod(class, oldSelector);
+    method_exchangeImplementations(oldMethod, newMethod);
+};
+
+#pragma mark - NSLayoutConstaint Category
+
+@interface NSLayoutConstraint (_GJRatioAutoLayout)
+
+/**
+ *  gj_isRatio mark the constant is origin or scaled.
+ */
+@property (nonatomic, assign) BOOL gj_isRatio;
+
+@end
+
+@implementation NSLayoutConstraint (_GJRatioAutoLayout)
+
++ (void)load {
+    GJExchangeImplementations(self, @selector(gj_constant), @selector(constant));
+}
+
+- (CGFloat)gj_constant {
+    CGFloat constant = [self gj_constant];
+    if (self.gj_isRatio) {
+        constant *= GJ_Scale;
+    }
+    return constant;
+}
+
+- (void)setGj_isRatio:(BOOL)gj_isRatio {
+    if (self.gj_isRatio == gj_isRatio) return;
+    objc_setAssociatedObject(self, @selector(gj_isRatio), @(gj_isRatio), OBJC_ASSOCIATION_RETAIN);
+}
+
+- (BOOL)gj_isRatio {
+    return [objc_getAssociatedObject(self, _cmd) boolValue];
+}
+
+@end
+
+
+#pragma mark - UiView Category
+
+@implementation UIView (GJRatioAutoLayout)
+
++ (void)load {
+    GJExchangeImplementations(self, @selector(addConstraint:), @selector(gj_AddConstraint:));
+}
+
+- (BOOL)gj_aLRatio {
+    return [objc_getAssociatedObject(self, _cmd) boolValue];
+}
+
+- (void)setGj_aLRatio:(BOOL)aLRatio {
+    objc_setAssociatedObject(self, @selector(gj_aLRatio), @(aLRatio), OBJC_ASSOCIATION_RETAIN);
+}
+
+/**
+ *  set aLRatio
+ */
+- (void)setALRatio:(BOOL)aLRatio {
+    if (self.gj_aLRatio == aLRatio) return;
+    self.gj_aLRatio = aLRatio;
+    
+    if (self.gj_aLRatio) {
+        //if state is on, set all constraints constant scale
+        for (NSLayoutConstraint * constraint in [self.gj_constraints allObjects]) {
+            if (!constraint.gj_isRatio) {
+                constraint.gj_isRatio = YES;
+            }
+        }
+    }
+}
+
+/**
+ *  gj_constraints is a hash table that collect constraints himself
+ *
+ *  @return hash table, week array.
+ */
+- (NSHashTable *)gj_constraints {
+    NSHashTable *array = objc_getAssociatedObject(self, _cmd);
+    if (!array) {
+        array = [NSHashTable weakObjectsHashTable];
+        objc_setAssociatedObject(self, _cmd, array, OBJC_ASSOCIATION_RETAIN);
+    }
+    return array;
+}
+
+
+- (void)gj_AddConstraint:(NSLayoutConstraint *)constraint {
+    
+    if ([constraint isMemberOfClass:NSClassFromString(@"NSContentSizeLayoutConstraint")] &&
+        ([self isKindOfClass:[UILabel class]] ||
+         [self isKindOfClass:[UISlider class]] ||
+         [self isKindOfClass:[UISwitch class]] ||
+         [self isKindOfClass:[UIActivityIndicatorView class]] ||
+         [self isKindOfClass:[UIPageControl class]] ||
+         ([self isKindOfClass:[UIProgressView class]] &&
+           constraint.firstAttribute == NSLayoutAttributeHeight))) {
+             [self gj_AddConstraint:constraint];
+        return;
+    }
+
+    if ([constraint isMemberOfClass:[NSLayoutConstraint class]] ||
+        [constraint isMemberOfClass:NSClassFromString(@"MASLayoutConstraint")] ||
+        [constraint isMemberOfClass:NSClassFromString(@"NSIBPrototypingLayoutConstraint")] ||
+        [constraint isMemberOfClass:NSClassFromString(@"NSContentSizeLayoutConstraint")]) {
+    
+        //如果两个item有一个open,则这个constraint也open
+        if ([self checkALRatioWithFirstItem:constraint.firstItem
+                                 secondItem:constraint.secondItem]) {
+            if (!constraint.gj_isRatio) {
+                constraint.gj_isRatio = YES;
+            }
+        }
+
+        //set item's constraints
+        if (constraint.firstItem &&
+            [constraint.firstItem isKindOfClass:[UIView class]]) {
+            [((UIView *)constraint.firstItem).gj_constraints addObject:constraint];
+        }
+        
+        if (constraint.secondItem &&
+            [constraint.secondItem isKindOfClass:[UIView class]]) {
+            [((UIView *)constraint.secondItem).gj_constraints addObject:constraint];
+        }
+    }
+    
+    [self gj_AddConstraint:constraint];
+}
+
+- (BOOL)checkALRatioWithFirstItem:(id)firstItem
+                       secondItem:(id)secondItem {
+    BOOL firstRatio = NO;
+    if (firstItem && [firstItem isKindOfClass:[UIView class]]) {
+        UIView *firstView = firstItem;
+        firstRatio = firstView.gj_aLRatio;
+    }
+    
+    BOOL secondRatio = NO;
+    if (secondItem && [secondItem isKindOfClass:[UIView class]]) {
+        UIView *secondView = secondItem;
+        secondRatio = secondView.gj_aLRatio;
+    }
+    
+    return firstRatio || secondRatio;
+}
+
+@end
+