Parcourir la source

自定义引导页

nanxinlin il y a 6 ans
Parent
commit
0247f8c64e
34 fichiers modifiés avec 593 ajouts et 144 suppressions
  1. 75 42
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 27 0
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+IQKeyboardManagerSwift.swift
  3. 55 0
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift
  4. 2 0
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift
  5. 0 25
      RainbowPlanet/RainbowPlanet/Base.lproj/LaunchScreen.storyboard
  6. 0 24
      RainbowPlanet/RainbowPlanet/Base.lproj/Main.storyboard
  7. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json
  8. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/Contents.json
  9. 134 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/Contents.json
  10. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitWOSBiOS56_768x1004pt.png
  11. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitWOSBiOS56_768x1004pt@2x.png
  12. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS56_768x1024pt.png
  13. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS56_768x1024pt@2x.png
  14. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS789_768x1024pt.png
  15. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS789_768x1024pt@2x.png
  16. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x480pt.png
  17. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x480pt@2x.png
  18. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x568pt@2x.png
  19. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS789_320x480pt@2x.png
  20. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS789_320x568pt@2x.png
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS89_375x667pt@2x.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS89_414x736pt@3x.png
  23. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhoneXPortraitiOS11_375x812pt@3x.png
  24. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/Contents.json
  25. 23 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/Contents.json
  26. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line.png
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line@2x.png
  28. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line@3x.png
  29. 27 33
      RainbowPlanet/RainbowPlanet/Info.plist
  30. 32 0
      RainbowPlanet/RainbowPlanet/Tools/AppInfo/AppInfo.swift
  31. 50 0
      RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UserDefaults.swift
  32. 102 0
      RainbowPlanet/RainbowPlanet/Tools/GuidePageView/GuidePageView.swift
  33. 60 0
      RainbowPlanet/RainbowPlanet/Tools/GuidePageView/GuidePageViewCell.swift
  34. 0 20
      RainbowPlanet/RainbowPlanet/ViewController.swift

+ 75 - 42
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -14,8 +14,6 @@
 		A7807D45222F71F7009D98BB /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D44222F71F6009D98BB /* libz.tbd */; };
 		A7807D49222F7237009D98BB /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D48222F7237009D98BB /* CoreMotion.framework */; };
 		A7807D4B222F7248009D98BB /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D4A222F7248009D98BB /* CFNetwork.framework */; };
-		A7807D4D222F725A009D98BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D4C222F725A009D98BB /* Foundation.framework */; };
-		A7807D4F222F7264009D98BB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D4E222F7264009D98BB /* UIKit.framework */; };
 		A7807D51222F726C009D98BB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D50222F726B009D98BB /* CoreGraphics.framework */; };
 		A7807D53222F7274009D98BB /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D52222F7274009D98BB /* CoreText.framework */; };
 		A7807D55222F7283009D98BB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D54222F7283009D98BB /* QuartzCore.framework */; };
@@ -31,11 +29,14 @@
 		A7807DA4222FABC1009D98BB /* OAuth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D9B222FABC1009D98BB /* OAuth.framework */; };
 		A7807DA5222FABC1009D98BB /* EAccountApiSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807D9C222FABC1009D98BB /* EAccountApiSDK.framework */; };
 		A7807DA7222FAC69009D98BB /* libc++.1.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A7807DA6222FAC69009D98BB /* libc++.1.tbd */; };
+		A7807DAB222FB1CB009D98BB /* AppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DAA222FB1CB009D98BB /* AppInfo.swift */; };
+		A7807DAD222FB306009D98BB /* AppDelegate+Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DAC222FB306009D98BB /* AppDelegate+Window.swift */; };
+		A7807DB8222FBEDA009D98BB /* AppDelegate+IQKeyboardManagerSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DB7222FBEDA009D98BB /* AppDelegate+IQKeyboardManagerSwift.swift */; };
+		A7807DBB222FC166009D98BB /* GuidePageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DBA222FC166009D98BB /* GuidePageView.swift */; };
+		A7807DBD222FC478009D98BB /* GuidePageViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DBC222FC478009D98BB /* GuidePageViewCell.swift */; };
+		A7807DC0222FC946009D98BB /* Extension+UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7807DBF222FC946009D98BB /* Extension+UserDefaults.swift */; };
 		A7AE0120222E760500F521EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AE011F222E760500F521EA /* AppDelegate.swift */; };
-		A7AE0122222E760500F521EA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AE0121222E760500F521EA /* ViewController.swift */; };
-		A7AE0125222E760500F521EA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7AE0123222E760500F521EA /* Main.storyboard */; };
 		A7AE0127222E760500F521EA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7AE0126222E760500F521EA /* Assets.xcassets */; };
-		A7AE012A222E760500F521EA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7AE0128222E760500F521EA /* LaunchScreen.storyboard */; };
 		A7AE0135222E760500F521EA /* RainbowPlanetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AE0134222E760500F521EA /* RainbowPlanetTests.swift */; };
 		A7AE0140222E760500F521EA /* RainbowPlanetUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AE013F222E760500F521EA /* RainbowPlanetUITests.swift */; };
 		A7AE0151222E76EB00F521EA /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AE0150222E76EB00F521EA /* RootViewController.swift */; };
@@ -93,12 +94,15 @@
 		A7807D9B222FABC1009D98BB /* OAuth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OAuth.framework; sourceTree = "<group>"; };
 		A7807D9C222FABC1009D98BB /* EAccountApiSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EAccountApiSDK.framework; sourceTree = "<group>"; };
 		A7807DA6222FAC69009D98BB /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "usr/lib/libc++.1.tbd"; sourceTree = SDKROOT; };
+		A7807DAA222FB1CB009D98BB /* AppInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppInfo.swift; sourceTree = "<group>"; };
+		A7807DAC222FB306009D98BB /* AppDelegate+Window.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Window.swift"; sourceTree = "<group>"; };
+		A7807DB7222FBEDA009D98BB /* AppDelegate+IQKeyboardManagerSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+IQKeyboardManagerSwift.swift"; sourceTree = "<group>"; };
+		A7807DBA222FC166009D98BB /* GuidePageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuidePageView.swift; sourceTree = "<group>"; };
+		A7807DBC222FC478009D98BB /* GuidePageViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuidePageViewCell.swift; sourceTree = "<group>"; };
+		A7807DBF222FC946009D98BB /* Extension+UserDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Extension+UserDefaults.swift"; sourceTree = "<group>"; };
 		A7AE011C222E760500F521EA /* RainbowPlanet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RainbowPlanet.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7AE011F222E760500F521EA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
-		A7AE0121222E760500F521EA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
-		A7AE0124222E760500F521EA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		A7AE0126222E760500F521EA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
-		A7AE0129222E760500F521EA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		A7AE012B222E760500F521EA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		A7AE0130222E760500F521EA /* RainbowPlanetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RainbowPlanetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7AE0134222E760500F521EA /* RainbowPlanetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RainbowPlanetTests.swift; sourceTree = "<group>"; };
@@ -133,8 +137,6 @@
 				A7807D53222F7274009D98BB /* CoreText.framework in Frameworks */,
 				A7807D9E222FABC1009D98BB /* account_login_sdk_core.framework in Frameworks */,
 				A7807D51222F726C009D98BB /* CoreGraphics.framework in Frameworks */,
-				A7807D4F222F7264009D98BB /* UIKit.framework in Frameworks */,
-				A7807D4D222F725A009D98BB /* Foundation.framework in Frameworks */,
 				A7807DA4222FABC1009D98BB /* OAuth.framework in Frameworks */,
 				A7807D4B222F7248009D98BB /* CFNetwork.framework in Frameworks */,
 				A7807D49222F7237009D98BB /* CoreMotion.framework in Frameworks */,
@@ -216,11 +218,11 @@
 			path = Macro;
 			sourceTree = "<group>";
 		};
-		A7807D92222FAA61009D98BB /* New Group */ = {
+		A7807D92222FAA61009D98BB /* Manager */ = {
 			isa = PBXGroup;
 			children = (
 			);
-			path = "New Group";
+			path = Manager;
 			sourceTree = "<group>";
 		};
 		A7807D93222FABC1009D98BB /* ShanYanSDK */ = {
@@ -239,6 +241,50 @@
 			path = ShanYanSDK;
 			sourceTree = "<group>";
 		};
+		A7807DA8222FB155009D98BB /* Tools */ = {
+			isa = PBXGroup;
+			children = (
+				A7807DBE222FC933009D98BB /* Extension */,
+				A7807DB9222FC154009D98BB /* GuidePageView */,
+				A7807DA9222FB1CB009D98BB /* AppInfo */,
+			);
+			path = Tools;
+			sourceTree = "<group>";
+		};
+		A7807DA9222FB1CB009D98BB /* AppInfo */ = {
+			isa = PBXGroup;
+			children = (
+				A7807DAA222FB1CB009D98BB /* AppInfo.swift */,
+			);
+			path = AppInfo;
+			sourceTree = "<group>";
+		};
+		A7807DAE222FB874009D98BB /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				A7AE0126222E760500F521EA /* Assets.xcassets */,
+				A7AE012B222E760500F521EA /* Info.plist */,
+			);
+			path = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		A7807DB9222FC154009D98BB /* GuidePageView */ = {
+			isa = PBXGroup;
+			children = (
+				A7807DBA222FC166009D98BB /* GuidePageView.swift */,
+				A7807DBC222FC478009D98BB /* GuidePageViewCell.swift */,
+			);
+			path = GuidePageView;
+			sourceTree = "<group>";
+		};
+		A7807DBE222FC933009D98BB /* Extension */ = {
+			isa = PBXGroup;
+			children = (
+				A7807DBF222FC946009D98BB /* Extension+UserDefaults.swift */,
+			);
+			path = Extension;
+			sourceTree = "<group>";
+		};
 		A7AE0113222E760400F521EA = {
 			isa = PBXGroup;
 			children = (
@@ -264,17 +310,14 @@
 		A7AE011E222E760500F521EA /* RainbowPlanet */ = {
 			isa = PBXGroup;
 			children = (
-				A7807D92222FAA61009D98BB /* New Group */,
 				A7AE014D222E76A100F521EA /* AppDelegate */,
 				A7AE014E222E76AC00F521EA /* Base */,
 				A7AE015E222E7BDD00F521EA /* Modules */,
 				A7807D8B222F9CF9009D98BB /* Macro */,
+				A7807D92222FAA61009D98BB /* Manager */,
+				A7807DA8222FB155009D98BB /* Tools */,
 				A7807D3B222F70A0009D98BB /* Lib */,
-				A7AE0121222E760500F521EA /* ViewController.swift */,
-				A7AE0123222E760500F521EA /* Main.storyboard */,
-				A7AE0126222E760500F521EA /* Assets.xcassets */,
-				A7AE0128222E760500F521EA /* LaunchScreen.storyboard */,
-				A7AE012B222E760500F521EA /* Info.plist */,
+				A7807DAE222FB874009D98BB /* Supporting Files */,
 			);
 			path = RainbowPlanet;
 			sourceTree = "<group>";
@@ -301,6 +344,8 @@
 			isa = PBXGroup;
 			children = (
 				A7AE011F222E760500F521EA /* AppDelegate.swift */,
+				A7807DAC222FB306009D98BB /* AppDelegate+Window.swift */,
+				A7807DB7222FBEDA009D98BB /* AppDelegate+IQKeyboardManagerSwift.swift */,
 			);
 			path = AppDelegate;
 			sourceTree = "<group>";
@@ -563,13 +608,11 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				A7AE012A222E760500F521EA /* LaunchScreen.storyboard in Resources */,
 				A7807D9D222FABC1009D98BB /* TYRZResource.bundle in Resources */,
 				A7807DA2222FABC1009D98BB /* uni_account_login_sdk_res.bundle in Resources */,
 				A7AE0127222E760500F521EA /* Assets.xcassets in Resources */,
 				A7807D3F222F70C5009D98BB /* AlipaySDK.bundle in Resources */,
 				A7807DA3222FABC1009D98BB /* HTMLResource.bundle in Resources */,
-				A7AE0125222E760500F521EA /* Main.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -707,15 +750,20 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				A7AE0122222E760500F521EA /* ViewController.swift in Sources */,
 				A7AE015A222E7B4800F521EA /* RootTabbarController.swift in Sources */,
+				A7807DB8222FBEDA009D98BB /* AppDelegate+IQKeyboardManagerSwift.swift in Sources */,
+				A7807DAD222FB306009D98BB /* AppDelegate+Window.swift in Sources */,
 				A7AE0170222E7D5400F521EA /* ShoppingCartViewController.swift in Sources */,
+				A7807DAB222FB1CB009D98BB /* AppInfo.swift in Sources */,
 				A7AE0120222E760500F521EA /* AppDelegate.swift in Sources */,
+				A7807DBD222FC478009D98BB /* GuidePageViewCell.swift in Sources */,
 				A7AE0151222E76EB00F521EA /* RootViewController.swift in Sources */,
 				A7AE015D222E7BC000F521EA /* RootView.swift in Sources */,
+				A7807DBB222FC166009D98BB /* GuidePageView.swift in Sources */,
 				A7AE0157222E77A700F521EA /* RootNavigationController.swift in Sources */,
 				A7AE0169222E7D2800F521EA /* ShoppingViewController.swift in Sources */,
 				A7AE0154222E774C00F521EA /* RootWebViewController.swift in Sources */,
+				A7807DC0222FC946009D98BB /* Extension+UserDefaults.swift in Sources */,
 				A7AE0174222E7D6000F521EA /* MineViewController.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -751,25 +799,6 @@
 		};
 /* End PBXTargetDependency section */
 
-/* Begin PBXVariantGroup section */
-		A7AE0123222E760500F521EA /* Main.storyboard */ = {
-			isa = PBXVariantGroup;
-			children = (
-				A7AE0124222E760500F521EA /* Base */,
-			);
-			name = Main.storyboard;
-			sourceTree = "<group>";
-		};
-		A7AE0128222E760500F521EA /* LaunchScreen.storyboard */ = {
-			isa = PBXVariantGroup;
-			children = (
-				A7AE0129222E760500F521EA /* Base */,
-			);
-			name = LaunchScreen.storyboard;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
 /* Begin XCBuildConfiguration section */
 		A7AE0142222E760500F521EA /* Debug */ = {
 			isa = XCBuildConfiguration;
@@ -892,6 +921,7 @@
 			baseConfigurationReference = 1DD1CA03D797EC66156C1CB4 /* Pods-RainbowPlanet.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
 				ENABLE_BITCODE = NO;
@@ -906,7 +936,8 @@
 					"\"${PODS_ROOT}/Headers/Public/UMCShare\"",
 					"\"$(SRCROOT)/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h\"",
 				);
-				INFOPLIST_FILE = RainbowPlanet/Info.plist;
+				INFOPLIST_FILE = "$(SRCROOT)/RainbowPlanet/Supporting Files/Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -1024,6 +1055,7 @@
 			baseConfigurationReference = 8640BD6BD0F44B0788BBD034 /* Pods-RainbowPlanet.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
 				ENABLE_BITCODE = NO;
@@ -1038,7 +1070,8 @@
 					"\"${PODS_ROOT}/Headers/Public/UMCShare\"",
 					"\"$(SRCROOT)/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h\"",
 				);
-				INFOPLIST_FILE = RainbowPlanet/Info.plist;
+				INFOPLIST_FILE = "$(SRCROOT)/RainbowPlanet/Supporting Files/Info.plist";
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 27 - 0
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+IQKeyboardManagerSwift.swift

@@ -0,0 +1,27 @@
+//
+//  AppDelegate+IQKeyboardManagerSwift.swift
+//  CreaditPayment
+//
+//  Created by 南鑫林 on 2018/7/2.
+//  Copyright © 2018年 南鑫林. All rights reserved.
+//
+
+import UIKit
+import IQKeyboardManagerSwift
+
+extension AppDelegate {
+
+    /// 初始化键盘
+    func initIQKeyboard() {
+        // 控制整个功能是否启用
+        IQKeyboardManager.shared.enable = true
+        // 控制是否显示键盘上的自动工具条,当需要支持内联编辑(Inline Editing), 这就需要隐藏键盘上的工具条(默认打开)
+        IQKeyboardManager.shared.enableAutoToolbar = false
+        // 启用手势触摸:控制点击背景是否收起键盘。
+        IQKeyboardManager.shared.shouldResignOnTouchOutside = true
+        // 是否显示提示文字
+        IQKeyboardManager.shared.shouldShowToolbarPlaceholder = false;
+        // 控制键盘上的工具条文字颜色是否用户自定义,(使用TextField的tintColor属性IQToolbar,否则色调的颜色是黑色 )
+        IQKeyboardManager.shared.shouldToolbarUsesTextFieldTintColor = false;
+    }
+}

+ 55 - 0
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift

@@ -0,0 +1,55 @@
+//
+//  AppDelegate+Window.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/3/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+extension AppDelegate {
+
+    /// 初始化window
+    func initWindow() {
+        window = UIWindow.init(frame: UIScreen.main.bounds)
+        window?.backgroundColor = UIColor.white
+        window?.makeKeyAndVisible()
+        /// 设置Tabbar
+        setTabbarController()
+        /// 设置全局的TableView/ScrollView
+        setTableViewAppearance()
+        /// 设置全局的tabbar
+        setTabbarAppearence()
+        /// 设置引导页
+        setGuidePageView()
+    }
+
+    /// 设置Tabbar
+    func setTabbarController() {
+        window?.rootViewController = RootTabbarController.shared().tabBarController
+    }
+
+    ///设置全局的Tabbar
+    func setTabbarAppearence() {
+        UITabBar.appearance().isTranslucent = false
+        UITabBar.appearance().backgroundImage = UIImage();
+        UITabBar.appearance().backgroundColor = UIColor.white
+        UITabBar.appearance().shadowImage = UIImage(named: "tab_top_line")
+    }
+
+    /// UITableView全局
+    func setTableViewAppearance() {
+        UITableView.appearance().estimatedRowHeight = 0
+        UITableView.appearance().estimatedSectionHeaderHeight = 0
+        UITableView.appearance().estimatedSectionFooterHeight = 0
+    }
+
+    ///设置引导页
+    func setGuidePageView() {
+        _ = GuidePageView.init(images: ["ceshi","ceshi","ceshi"]) {
+
+        }
+    }
+}
+

+ 2 - 0
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift

@@ -16,6 +16,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // Override point for customization after application launch.
+        //初始化窗口
+        initWindow()
         return true
     }
 

+ 0 - 25
RainbowPlanet/RainbowPlanet/Base.lproj/LaunchScreen.storyboard

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--View Controller-->
-        <scene sceneID="EHf-IW-A2E">
-            <objects>
-                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
-                    </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="53" y="375"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 24
RainbowPlanet/RainbowPlanet/Base.lproj/Main.storyboard

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--View Controller-->
-        <scene sceneID="tne-QT-ifu">
-            <objects>
-                <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
-                    </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
-            </objects>
-        </scene>
-    </scenes>
-</document>

RainbowPlanet/RainbowPlanet/Assets.xcassets/AppIcon.appiconset/Contents.json → RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json


RainbowPlanet/RainbowPlanet/Assets.xcassets/Contents.json → RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/Contents.json


+ 134 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/Contents.json

@@ -0,0 +1,134 @@
+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "2688h",
+      "scale" : "3x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "12.0",
+      "subtype" : "1792h",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "2436h",
+      "filename" : "LaunchImageiPhoneXPortraitiOS11_375x812pt@3x.png",
+      "minimum-system-version" : "11.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "736h",
+      "filename" : "LaunchImageiPhonePortraitiOS89_414x736pt@3x.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "667h",
+      "filename" : "LaunchImageiPhonePortraitiOS89_375x667pt@2x.png",
+      "minimum-system-version" : "8.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "LaunchImageiPhonePortraitiOS789_320x480pt@2x.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "retina4",
+      "filename" : "LaunchImageiPhonePortraitiOS789_320x568pt@2x.png",
+      "minimum-system-version" : "7.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitiOS789_768x1024pt.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitiOS789_768x1024pt@2x.png",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "LaunchImageiPhonePortraitiOS56_320x480pt.png",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "LaunchImageiPhonePortraitiOS56_320x480pt@2x.png",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "filename" : "LaunchImageiPhonePortraitiOS56_320x568pt@2x.png",
+      "extent" : "full-screen",
+      "subtype" : "retina4",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitWOSBiOS56_768x1004pt.png",
+      "extent" : "to-status-bar",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitiOS56_768x1024pt.png",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitWOSBiOS56_768x1004pt@2x.png",
+      "extent" : "to-status-bar",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "filename" : "LaunchImageiPadPortraitiOS56_768x1024pt@2x.png",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitWOSBiOS56_768x1004pt.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitWOSBiOS56_768x1004pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS56_768x1024pt.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS56_768x1024pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS789_768x1024pt.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPadPortraitiOS789_768x1024pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x480pt.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x480pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS56_320x568pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS789_320x480pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS789_320x568pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS89_375x667pt@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhonePortraitiOS89_414x736pt@3x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/LaunchImage.launchimage/LaunchImageiPhoneXPortraitiOS11_375x812pt@3x.png


+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tab_top_line.imageset/tab_top_line@3x.png


+ 27 - 33
RainbowPlanet/RainbowPlanet/Info.plist

@@ -29,31 +29,6 @@
 	</array>
 	<key>CFBundleVersion</key>
 	<string>1</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>UILaunchStoryboardName</key>
-	<string>LaunchScreen</string>
-	<key>UIMainStoryboardFile</key>
-	<string>Main</string>
-	<key>UIRequiredDeviceCapabilities</key>
-	<array>
-		<string>armv7</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>NSPhotoLibraryUsageDescription</key>
-	<string>App需要您的同意,才能访问相册</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>wechat</string>
@@ -105,22 +80,24 @@
 		<string>alipay</string>
 		<string>alipayshare</string>
 	</array>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 		<key>NSExceptionDomains</key>
 		<dict>
-			<key>sina.com.cn</key>
+			<key>sina.cn</key>
 			<dict>
+				<key>NSExceptionMinimumTLSVersion</key>
+				<string>TLSv1.0</string>
 				<key>NSIncludesSubdomains</key>
 				<true/>
-				<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
-				<true/>
 				<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
 				<false/>
 			</dict>
-			<key>sinaimg.cn</key>
+			<key>sina.com.cn</key>
 			<dict>
 				<key>NSIncludesSubdomains</key>
 				<true/>
@@ -129,7 +106,7 @@
 				<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
 				<false/>
 			</dict>
-			<key>sinajs.cn</key>
+			<key>sinaimg.cn</key>
 			<dict>
 				<key>NSIncludesSubdomains</key>
 				<true/>
@@ -138,12 +115,12 @@
 				<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
 				<false/>
 			</dict>
-			<key>sina.cn</key>
+			<key>sinajs.cn</key>
 			<dict>
-				<key>NSExceptionMinimumTLSVersion</key>
-				<string>TLSv1.0</string>
 				<key>NSIncludesSubdomains</key>
 				<true/>
+				<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
 				<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
 				<false/>
 			</dict>
@@ -169,5 +146,22 @@
 			</dict>
 		</dict>
 	</dict>
+	<key>NSPhotoLibraryUsageDescription</key>
+	<string>App需要您的同意,才能访问相册</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
 </dict>
 </plist>

+ 32 - 0
RainbowPlanet/RainbowPlanet/Tools/AppInfo/AppInfo.swift

@@ -0,0 +1,32 @@
+//
+//  AppInfo.swift
+//  CreaditPayment
+//
+//  Created by 南鑫林 on 2019/1/20.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+struct  AppInfo {
+    static let infoDictionary = Bundle.main.infoDictionary
+
+    static let appDisplayName: String = Bundle.main.infoDictionary!["CFBundleDisplayName"] as! String //App 名称
+
+    static let bundleIdentifier:String = Bundle.main.bundleIdentifier! // Bundle Identifier
+
+    static let appVersion:String = Bundle.main.infoDictionary! ["CFBundleShortVersionString"] as! String// App 版本号
+
+    static let buildVersion : String = Bundle.main.infoDictionary! ["CFBundleVersion"] as! String //Bulid 版本号
+
+    static let iOSVersion:String = UIDevice.current.systemVersion //ios 版本
+
+    static let identifierNumber = UIDevice.current.identifierForVendor //设备 udid
+
+    static let systemName = UIDevice.current.systemName //设备名称
+
+    static let model = UIDevice.current.model // 设备型号
+
+    static let localizedModel = UIDevice.current.localizedModel  //设备区域化型号
+
+}

+ 50 - 0
RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UserDefaults.swift

@@ -0,0 +1,50 @@
+//
+//  Extension+UserDefaults.swift
+//  CreaditPayment
+//
+//  Created by 南鑫林 on 2018/9/13.
+//  Copyright © 2018年 南鑫林. All rights reserved.
+//
+
+import Foundation
+
+extension UserDefaults {
+    
+    /// 应用第一次启动
+    ///
+    /// - Returns: 是否是应用第一次启动
+    static func isFirstLaunch() -> Bool {
+        let hasBeenLaunched = "hasBeenLaunched"
+        let isFirstLaunch = !UserDefaults.standard.bool(forKey: hasBeenLaunched)
+        if isFirstLaunch {
+            UserDefaults.standard.set(true, forKey: hasBeenLaunched)
+            UserDefaults.standard.synchronize()
+        }
+        return isFirstLaunch
+    }
+    
+    /// 当前版本第一次启动
+    ///
+    /// - Returns: 是否是当前版本第一次启动
+    static func isFirstLaunchOfNewVersion() -> Bool {
+        
+        /// 主程序版本号
+        let infoDictionary = Bundle.main.infoDictionary!
+        let majorVersion = infoDictionary["CFBundleShortVersionString"] as! String
+        
+        /// 上次启动的版本号
+        let hasBeenLaunchedOfNewVersion = "hasBeenLaunchedOfNewVersion"
+        let lastLaunchVersion = UserDefaults.standard.string(forKey:
+            hasBeenLaunchedOfNewVersion)
+        
+        /// 版本号比较
+        let isFirstLaunchOfNewVersion = majorVersion != lastLaunchVersion
+        if isFirstLaunchOfNewVersion {
+            UserDefaults.standard.set(majorVersion, forKey:
+                hasBeenLaunchedOfNewVersion)
+            UserDefaults.standard.synchronize()
+        }
+        return isFirstLaunchOfNewVersion
+    }
+    
+}

+ 102 - 0
RainbowPlanet/RainbowPlanet/Tools/GuidePageView/GuidePageView.swift

@@ -0,0 +1,102 @@
+//
+//  GuidePageView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/3/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class GuidePageView: UIView {
+
+    private var imageArray: Array<String>?
+
+    typealias CompletionBlock = () -> Void
+    var completionBlock : CompletionBlock?
+
+    public convenience init(frame: CGRect = UIScreen.main.bounds, images: Array<String>,completionBlock:@escaping CompletionBlock) {
+        self.init(frame: frame)
+        if UserDefaults.isFirstLaunchOfNewVersion() {
+            let window = UIApplication.shared.windows.last
+            window?.addSubview(self)
+            self.imageArray = images
+            self.completionBlock = completionBlock
+            self.backgroundColor = UIColor.white
+            setupSubviews(frame: frame)
+        }else {
+            self.removeGuideViewFromSupview()
+        }
+    }
+
+    private override init(frame: CGRect) {
+        super.init(frame: frame)
+    }
+
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    func setupSubviews(frame: CGRect) {
+        addSubview(pagerView)
+        pagerView.frame = frame
+    }
+
+
+
+    //MARK: - lazy
+    private lazy var pagerView: UICollectionView = {
+        let pagerView = UICollectionView.init(frame: self.frame, collectionViewLayout: pagerViewLayout)
+        pagerView.backgroundColor = UIColor.white
+        pagerView.dataSource = self
+        pagerView.delegate = self
+        pagerView.isPagingEnabled = true
+        if #available(iOS 11.0, *) {
+            pagerView.contentInsetAdjustmentBehavior =  .never
+        }
+        return pagerView
+    }()
+
+    private lazy var pagerViewLayout: UICollectionViewFlowLayout = {
+        let pagerViewLayout = UICollectionViewFlowLayout.init()
+        pagerViewLayout.minimumLineSpacing = 0
+        pagerViewLayout.minimumInteritemSpacing = 0
+        pagerViewLayout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+        pagerViewLayout.scrollDirection = .horizontal
+        pagerViewLayout.itemSize = UIScreen.main.bounds.size
+        return pagerViewLayout
+    }()
+
+    //MARK: - 移除所有的View
+    private func removeGuideViewFromSupview() {
+        UIView.animate(withDuration: 1.0, delay: 0, options: UIView.AnimationOptions.curveEaseOut, animations: {
+            self.alpha = 0.0
+        }) { (_) in
+            self.removeFromSuperview()
+        }
+    }
+}
+
+extension GuidePageView:UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+            return (imageArray?.count)!
+    }
+
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = GuidePageViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+    }
+
+    func scrollViewDidScroll(_ scrollView: UIScrollView) {
+        if scrollView.contentOffset.x > CGFloat(imageArray!.count-1) * UIScreen.main.bounds.size.width {
+            removeGuideViewFromSupview()
+        }
+    }
+
+}
+

+ 60 - 0
RainbowPlanet/RainbowPlanet/Tools/GuidePageView/GuidePageViewCell.swift

@@ -0,0 +1,60 @@
+//
+//  GuidePageViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/3/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import FSPagerView
+import SnapKit
+
+class GuidePageViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> GuidePageViewCell {
+        let ID = "GuidePageViewCell"
+        collectionView.register(GuidePageViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : GuidePageViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! GuidePageViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            titleLabel.text = "\(String(describing: indexPath!.row))"
+        }
+    }
+    
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+        setupLayouts()
+    }
+
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    //MARK: - 设置view
+    private func setupViews() {
+        backgroundColor = UIColor.white
+        addSubview(titleLabel)
+    }
+
+    private func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = UIColor.blue
+        titleLabel.font = UIFont.systemFont(ofSize: 20)
+        titleLabel.textAlignment = .center
+        titleLabel.isUserInteractionEnabled = true
+        return titleLabel
+    }()
+
+}

+ 0 - 20
RainbowPlanet/RainbowPlanet/ViewController.swift

@@ -1,20 +0,0 @@
-//
-//  ViewController.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/3/5.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class ViewController: UIViewController {
-
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        // Do any additional setup after loading the view, typically from a nib.
-    }
-
-
-}
-