diff --git a/.gitignore b/.gitignore index 8a981e9..6a3aa4f 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ playground.xcworkspace # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # -# Pods/ +Pods/ # # Add this line if you want to avoid checking in source code from the Xcode workspace # *.xcworkspace diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..985ab05 --- /dev/null +++ b/Podfile @@ -0,0 +1,21 @@ +# Uncomment the next line to define a global platform for your project +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '15.6' + +target 'Veloria' do + + use_frameworks! + + pod 'Moya' #网络框架 + pod 'SnapKit' #布局 + pod 'SmartCodable' #数据解析 + pod 'YYKit' #工具类 + pod 'MJRefresh' #刷新控件 + pod 'Toast' #吐司提示 + pod 'ZFPlayer/AVPlayer' #播放器 + pod 'KTVHTTPCache' #视频缓存 + pod 'HWPanModal' #底部弹出控制器 + pod 'Kingfisher' #图片加载 + pod "ESTabBarController-swift" + +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..adc154f --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,70 @@ +PODS: + - Alamofire (5.10.2) + - CocoaAsyncSocket (7.6.5) + - ESTabBarController-swift (2.8.0) + - HWPanModal (0.9.9) + - Kingfisher (8.3.2) + - KTVHTTPCache (3.0.2): + - CocoaAsyncSocket + - MJRefresh (3.7.9) + - Moya (15.0.0): + - Moya/Core (= 15.0.0) + - Moya/Core (15.0.0): + - Alamofire (~> 5.0) + - SmartCodable (4.3.9) + - SnapKit (5.7.1) + - Toast (4.1.1) + - YYKit (1.0.9): + - YYKit/no-arc (= 1.0.9) + - YYKit/no-arc (1.0.9) + - ZFPlayer/AVPlayer (4.1.4): + - ZFPlayer/Core + - ZFPlayer/Core (4.1.4) + +DEPENDENCIES: + - ESTabBarController-swift + - HWPanModal + - Kingfisher + - KTVHTTPCache + - MJRefresh + - Moya + - SmartCodable + - SnapKit + - Toast + - YYKit + - ZFPlayer/AVPlayer + +SPEC REPOS: + https://github.com/CocoaPods/Specs.git: + - Alamofire + - CocoaAsyncSocket + - ESTabBarController-swift + - HWPanModal + - Kingfisher + - KTVHTTPCache + - MJRefresh + - Moya + - SmartCodable + - SnapKit + - Toast + - YYKit + - ZFPlayer + +SPEC CHECKSUMS: + Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 + ESTabBarController-swift: 05593a6ad64700b03c0eb60ff625916370aa4136 + HWPanModal: b57a6717d3cdcd666bff44f9dd2a5be9f4d6f5d2 + Kingfisher: 0621d0ac0c78fecb19f6dc5303bde2b52abaf2f5 + KTVHTTPCache: 5711692cdf9a5ecfe829b1e16577deb3ffe3dc86 + MJRefresh: ff9e531227924c84ce459338414550a05d2aea78 + Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee + SmartCodable: efc682e18fb5eac77f4c0497e37c79590710c192 + SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a + Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e + YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7 + ZFPlayer: 5cf39e8d9f0c2394a014b0db4767b5b5a6bffe13 + +PODFILE CHECKSUM: d4ff89d9ef2517ec087add019c6f39f8e9ee69d0 + +COCOAPODS: 1.16.2 diff --git a/Veloria.xcodeproj/project.pbxproj b/Veloria.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4f33ab1 --- /dev/null +++ b/Veloria.xcodeproj/project.pbxproj @@ -0,0 +1,698 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 1B056E2B2DDAC0FD007EE38D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E212DDAC0FD007EE38D /* AppDelegate.swift */; }; + 1B056E2C2DDAC0FD007EE38D /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E282DDAC0FD007EE38D /* SceneDelegate.swift */; }; + 1B056E2E2DDAC0FD007EE38D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1B056E222DDAC0FD007EE38D /* Assets.xcassets */; }; + 1B056E302DDAC0FD007EE38D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B056E252DDAC0FD007EE38D /* LaunchScreen.storyboard */; }; + 1B056E3F2DDAC2DB007EE38D /* VPCryptorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E3E2DDAC2DB007EE38D /* VPCryptorService.swift */; }; + 1B056E412DDAC30A007EE38D /* VPModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E402DDAC30A007EE38D /* VPModel.swift */; }; + 1B056E442DDAC355007EE38D /* UIDevice+VPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E432DDAC355007EE38D /* UIDevice+VPAdd.swift */; }; + 1B056E462DDAC370007EE38D /* UIScreen+VPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E452DDAC370007EE38D /* UIScreen+VPAdd.swift */; }; + 1B056E492DDAC3DF007EE38D /* VPAppTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E482DDAC3DF007EE38D /* VPAppTool.swift */; }; + 1B056E4B2DDAC6BA007EE38D /* VPDefine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E4A2DDAC6BA007EE38D /* VPDefine.swift */; }; + 1B056E4D2DDAC7C1007EE38D /* VPTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E4C2DDAC7C1007EE38D /* VPTabBarController.swift */; }; + 1B056E4F2DDAC7FC007EE38D /* VPNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E4E2DDAC7FC007EE38D /* VPNavigationController.swift */; }; + 1B056E512DDACBE5007EE38D /* VPViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E502DDACBE5007EE38D /* VPViewController.swift */; }; + 1B056E572DDACC6B007EE38D /* VPHomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E562DDACC6B007EE38D /* VPHomePageViewController.swift */; }; + 1B056E592DDACD44007EE38D /* VPTabBarItemContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E582DDACD44007EE38D /* VPTabBarItemContentView.swift */; }; + 1B056E5B2DDACD80007EE38D /* UIColor+VPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E5A2DDACD80007EE38D /* UIColor+VPAdd.swift */; }; + 1B056E5D2DDACD8E007EE38D /* UIFont+VPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E5C2DDACD8E007EE38D /* UIFont+VPAdd.swift */; }; + 1B056E642DDAD035007EE38D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1B056E622DDAD035007EE38D /* Localizable.strings */; }; + 1B056E6A2DDAD0BF007EE38D /* VPLocalizedManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E692DDAD0BF007EE38D /* VPLocalizedManager.swift */; }; + 1B056E6C2DDADAA1007EE38D /* VPTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E6B2DDADAA1007EE38D /* VPTabBar.swift */; }; + 1B056E702DDB019B007EE38D /* VPTabBarItemContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E6F2DDB019B007EE38D /* VPTabBarItemContainer.swift */; }; + 1B056E722DDB022F007EE38D /* VPTabBarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E712DDB022F007EE38D /* VPTabBarItem.swift */; }; + 1B056E742DDB2DD7007EE38D /* UIView+VPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E732DDB2DD7007EE38D /* UIView+VPAdd.swift */; }; + 1B056E772DDB3641007EE38D /* VPTabBarItemNormalVew.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E762DDB3641007EE38D /* VPTabBarItemNormalVew.swift */; }; + 1B056E792DDB365A007EE38D /* VPTabBarItemSelectedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E782DDB365A007EE38D /* VPTabBarItemSelectedView.swift */; }; + 1B056E7B2DDB37BA007EE38D /* VPGradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B056E7A2DDB37BA007EE38D /* VPGradientView.swift */; }; + F939C04AD4003BA127F15C28 /* Pods_Veloria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F57E87E765BF8D72A43DCA /* Pods_Veloria.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1B056DF42DDABE2B007EE38D /* Veloria.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Veloria.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1B056E212DDAC0FD007EE38D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 1B056E222DDAC0FD007EE38D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1B056E232DDAC0FD007EE38D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1B056E242DDAC0FD007EE38D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 1B056E282DDAC0FD007EE38D /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 1B056E3E2DDAC2DB007EE38D /* VPCryptorService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPCryptorService.swift; sourceTree = ""; }; + 1B056E402DDAC30A007EE38D /* VPModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPModel.swift; sourceTree = ""; }; + 1B056E432DDAC355007EE38D /* UIDevice+VPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+VPAdd.swift"; sourceTree = ""; }; + 1B056E452DDAC370007EE38D /* UIScreen+VPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+VPAdd.swift"; sourceTree = ""; }; + 1B056E482DDAC3DF007EE38D /* VPAppTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPAppTool.swift; sourceTree = ""; }; + 1B056E4A2DDAC6BA007EE38D /* VPDefine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPDefine.swift; sourceTree = ""; }; + 1B056E4C2DDAC7C1007EE38D /* VPTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarController.swift; sourceTree = ""; }; + 1B056E4E2DDAC7FC007EE38D /* VPNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNavigationController.swift; sourceTree = ""; }; + 1B056E502DDACBE5007EE38D /* VPViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPViewController.swift; sourceTree = ""; }; + 1B056E562DDACC6B007EE38D /* VPHomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPHomePageViewController.swift; sourceTree = ""; }; + 1B056E582DDACD44007EE38D /* VPTabBarItemContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarItemContentView.swift; sourceTree = ""; }; + 1B056E5A2DDACD80007EE38D /* UIColor+VPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+VPAdd.swift"; sourceTree = ""; }; + 1B056E5C2DDACD8E007EE38D /* UIFont+VPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+VPAdd.swift"; sourceTree = ""; }; + 1B056E5E2DDACE12007EE38D /* Veloria-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Veloria-Bridging-Header.h"; sourceTree = ""; }; + 1B056E632DDAD035007EE38D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 1B056E692DDAD0BF007EE38D /* VPLocalizedManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPLocalizedManager.swift; sourceTree = ""; }; + 1B056E6B2DDADAA1007EE38D /* VPTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBar.swift; sourceTree = ""; }; + 1B056E6F2DDB019B007EE38D /* VPTabBarItemContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarItemContainer.swift; sourceTree = ""; }; + 1B056E712DDB022F007EE38D /* VPTabBarItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarItem.swift; sourceTree = ""; }; + 1B056E732DDB2DD7007EE38D /* UIView+VPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+VPAdd.swift"; sourceTree = ""; }; + 1B056E762DDB3641007EE38D /* VPTabBarItemNormalVew.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarItemNormalVew.swift; sourceTree = ""; }; + 1B056E782DDB365A007EE38D /* VPTabBarItemSelectedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPTabBarItemSelectedView.swift; sourceTree = ""; }; + 1B056E7A2DDB37BA007EE38D /* VPGradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPGradientView.swift; sourceTree = ""; }; + 316330F9CC4DB54283ADC8A9 /* Pods-VideoPlayer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoPlayer.release.xcconfig"; path = "Target Support Files/Pods-VideoPlayer/Pods-VideoPlayer.release.xcconfig"; sourceTree = ""; }; + 34F57E87E765BF8D72A43DCA /* Pods_Veloria.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Veloria.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 831DCE145EAEF22088BB06E4 /* Pods-Veloria.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Veloria.debug.xcconfig"; path = "Target Support Files/Pods-Veloria/Pods-Veloria.debug.xcconfig"; sourceTree = ""; }; + AA827CC8ACC3AE70E33A0EEB /* Pods-Veloria.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Veloria.release.xcconfig"; path = "Target Support Files/Pods-Veloria/Pods-Veloria.release.xcconfig"; sourceTree = ""; }; + E0BDA3570E00C90877E45AA0 /* Pods-VideoPlayer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoPlayer.debug.xcconfig"; path = "Target Support Files/Pods-VideoPlayer/Pods-VideoPlayer.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1B056DF12DDABE2B007EE38D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F939C04AD4003BA127F15C28 /* Pods_Veloria.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1B056DEB2DDABE2B007EE38D = { + isa = PBXGroup; + children = ( + 1B056E2A2DDAC0FD007EE38D /* Veloria */, + 1B056DF52DDABE2B007EE38D /* Products */, + 97790501CCBF987017A55C80 /* Pods */, + AEE348721F7DD68AB45E7964 /* Frameworks */, + ); + sourceTree = ""; + }; + 1B056DF52DDABE2B007EE38D /* Products */ = { + isa = PBXGroup; + children = ( + 1B056DF42DDABE2B007EE38D /* Veloria.app */, + ); + name = Products; + sourceTree = ""; + }; + 1B056E2A2DDAC0FD007EE38D /* Veloria */ = { + isa = PBXGroup; + children = ( + 1B056E322DDAC18C007EE38D /* AppDelegate */, + 1B056E372DDAC1EF007EE38D /* Base */, + 1B056E362DDAC1E8007EE38D /* Class */, + 1B056E352DDAC1DE007EE38D /* Libs */, + 1B056E342DDAC1C7007EE38D /* Thirdparty */, + 1B056E332DDAC1AB007EE38D /* Source */, + ); + path = Veloria; + sourceTree = ""; + }; + 1B056E322DDAC18C007EE38D /* AppDelegate */ = { + isa = PBXGroup; + children = ( + 1B056E212DDAC0FD007EE38D /* AppDelegate.swift */, + 1B056E282DDAC0FD007EE38D /* SceneDelegate.swift */, + ); + path = AppDelegate; + sourceTree = ""; + }; + 1B056E332DDAC1AB007EE38D /* Source */ = { + isa = PBXGroup; + children = ( + 1B056E222DDAC0FD007EE38D /* Assets.xcassets */, + 1B056E232DDAC0FD007EE38D /* Info.plist */, + 1B056E252DDAC0FD007EE38D /* LaunchScreen.storyboard */, + 1B056E5E2DDACE12007EE38D /* Veloria-Bridging-Header.h */, + 1B056E622DDAD035007EE38D /* Localizable.strings */, + ); + path = Source; + sourceTree = ""; + }; + 1B056E342DDAC1C7007EE38D /* Thirdparty */ = { + isa = PBXGroup; + children = ( + ); + path = Thirdparty; + sourceTree = ""; + }; + 1B056E352DDAC1DE007EE38D /* Libs */ = { + isa = PBXGroup; + children = ( + 1B056E652DDAD098007EE38D /* LocalizedManager */, + 1B056E472DDAC3CB007EE38D /* AppTool */, + ); + path = Libs; + sourceTree = ""; + }; + 1B056E362DDAC1E8007EE38D /* Class */ = { + isa = PBXGroup; + children = ( + 1B056E522DDACBF4007EE38D /* Home */, + ); + path = Class; + sourceTree = ""; + }; + 1B056E372DDAC1EF007EE38D /* Base */ = { + isa = PBXGroup; + children = ( + 1B056E382DDAC212007EE38D /* Controller */, + 1B056E392DDAC219007EE38D /* View */, + 1B056E3A2DDAC21E007EE38D /* Model */, + 1B056E422DDAC32C007EE38D /* Extension */, + 1B056E3C2DDAC23D007EE38D /* Define */, + 1B056E3B2DDAC22D007EE38D /* Networking */, + ); + path = Base; + sourceTree = ""; + }; + 1B056E382DDAC212007EE38D /* Controller */ = { + isa = PBXGroup; + children = ( + 1B056E4C2DDAC7C1007EE38D /* VPTabBarController.swift */, + 1B056E4E2DDAC7FC007EE38D /* VPNavigationController.swift */, + 1B056E502DDACBE5007EE38D /* VPViewController.swift */, + ); + path = Controller; + sourceTree = ""; + }; + 1B056E392DDAC219007EE38D /* View */ = { + isa = PBXGroup; + children = ( + 1B056E752DDB35C5007EE38D /* TabBar */, + 1B056E7A2DDB37BA007EE38D /* VPGradientView.swift */, + ); + path = View; + sourceTree = ""; + }; + 1B056E3A2DDAC21E007EE38D /* Model */ = { + isa = PBXGroup; + children = ( + 1B056E402DDAC30A007EE38D /* VPModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + 1B056E3B2DDAC22D007EE38D /* Networking */ = { + isa = PBXGroup; + children = ( + 1B056E3D2DDAC283007EE38D /* Base */, + ); + path = Networking; + sourceTree = ""; + }; + 1B056E3C2DDAC23D007EE38D /* Define */ = { + isa = PBXGroup; + children = ( + 1B056E4A2DDAC6BA007EE38D /* VPDefine.swift */, + ); + path = Define; + sourceTree = ""; + }; + 1B056E3D2DDAC283007EE38D /* Base */ = { + isa = PBXGroup; + children = ( + 1B056E3E2DDAC2DB007EE38D /* VPCryptorService.swift */, + ); + path = Base; + sourceTree = ""; + }; + 1B056E422DDAC32C007EE38D /* Extension */ = { + isa = PBXGroup; + children = ( + 1B056E432DDAC355007EE38D /* UIDevice+VPAdd.swift */, + 1B056E452DDAC370007EE38D /* UIScreen+VPAdd.swift */, + 1B056E5A2DDACD80007EE38D /* UIColor+VPAdd.swift */, + 1B056E5C2DDACD8E007EE38D /* UIFont+VPAdd.swift */, + 1B056E732DDB2DD7007EE38D /* UIView+VPAdd.swift */, + ); + path = Extension; + sourceTree = ""; + }; + 1B056E472DDAC3CB007EE38D /* AppTool */ = { + isa = PBXGroup; + children = ( + 1B056E482DDAC3DF007EE38D /* VPAppTool.swift */, + ); + path = AppTool; + sourceTree = ""; + }; + 1B056E522DDACBF4007EE38D /* Home */ = { + isa = PBXGroup; + children = ( + 1B056E552DDACC08007EE38D /* Controller */, + 1B056E542DDACC03007EE38D /* View */, + 1B056E532DDACBFA007EE38D /* Model */, + ); + path = Home; + sourceTree = ""; + }; + 1B056E532DDACBFA007EE38D /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 1B056E542DDACC03007EE38D /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 1B056E552DDACC08007EE38D /* Controller */ = { + isa = PBXGroup; + children = ( + 1B056E562DDACC6B007EE38D /* VPHomePageViewController.swift */, + ); + path = Controller; + sourceTree = ""; + }; + 1B056E652DDAD098007EE38D /* LocalizedManager */ = { + isa = PBXGroup; + children = ( + 1B056E692DDAD0BF007EE38D /* VPLocalizedManager.swift */, + ); + path = LocalizedManager; + sourceTree = ""; + }; + 1B056E752DDB35C5007EE38D /* TabBar */ = { + isa = PBXGroup; + children = ( + 1B056E6B2DDADAA1007EE38D /* VPTabBar.swift */, + 1B056E712DDB022F007EE38D /* VPTabBarItem.swift */, + 1B056E582DDACD44007EE38D /* VPTabBarItemContentView.swift */, + 1B056E6F2DDB019B007EE38D /* VPTabBarItemContainer.swift */, + 1B056E762DDB3641007EE38D /* VPTabBarItemNormalVew.swift */, + 1B056E782DDB365A007EE38D /* VPTabBarItemSelectedView.swift */, + ); + path = TabBar; + sourceTree = ""; + }; + 97790501CCBF987017A55C80 /* Pods */ = { + isa = PBXGroup; + children = ( + E0BDA3570E00C90877E45AA0 /* Pods-VideoPlayer.debug.xcconfig */, + 316330F9CC4DB54283ADC8A9 /* Pods-VideoPlayer.release.xcconfig */, + 831DCE145EAEF22088BB06E4 /* Pods-Veloria.debug.xcconfig */, + AA827CC8ACC3AE70E33A0EEB /* Pods-Veloria.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + AEE348721F7DD68AB45E7964 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 34F57E87E765BF8D72A43DCA /* Pods_Veloria.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1B056DF32DDABE2B007EE38D /* Veloria */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1B056E072DDABE2D007EE38D /* Build configuration list for PBXNativeTarget "Veloria" */; + buildPhases = ( + 70FFDE820D8DC4AE8FA47E4A /* [CP] Check Pods Manifest.lock */, + 1B056DF02DDABE2B007EE38D /* Sources */, + 1B056DF12DDABE2B007EE38D /* Frameworks */, + 1B056DF22DDABE2B007EE38D /* Resources */, + D1E2E0FAE9833666668F2F70 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Veloria; + productName = VideoPlayer; + productReference = 1B056DF42DDABE2B007EE38D /* Veloria.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1B056DEC2DDABE2B007EE38D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + CLASSPREFIX = VP; + LastSwiftUpdateCheck = 1620; + LastUpgradeCheck = 1620; + TargetAttributes = { + 1B056DF32DDABE2B007EE38D = { + CreatedOnToolsVersion = 16.2; + LastSwiftMigration = 1620; + }; + }; + }; + buildConfigurationList = 1B056DEF2DDABE2B007EE38D /* Build configuration list for PBXProject "Veloria" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1B056DEB2DDABE2B007EE38D; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 1B056DF52DDABE2B007EE38D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1B056DF32DDABE2B007EE38D /* Veloria */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1B056DF22DDABE2B007EE38D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B056E2E2DDAC0FD007EE38D /* Assets.xcassets in Resources */, + 1B056E642DDAD035007EE38D /* Localizable.strings in Resources */, + 1B056E302DDAC0FD007EE38D /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 70FFDE820D8DC4AE8FA47E4A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Veloria-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + D1E2E0FAE9833666668F2F70 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Veloria/Pods-Veloria-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Veloria/Pods-Veloria-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Veloria/Pods-Veloria-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1B056DF02DDABE2B007EE38D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1B056E742DDB2DD7007EE38D /* UIView+VPAdd.swift in Sources */, + 1B056E572DDACC6B007EE38D /* VPHomePageViewController.swift in Sources */, + 1B056E7B2DDB37BA007EE38D /* VPGradientView.swift in Sources */, + 1B056E772DDB3641007EE38D /* VPTabBarItemNormalVew.swift in Sources */, + 1B056E4B2DDAC6BA007EE38D /* VPDefine.swift in Sources */, + 1B056E702DDB019B007EE38D /* VPTabBarItemContainer.swift in Sources */, + 1B056E592DDACD44007EE38D /* VPTabBarItemContentView.swift in Sources */, + 1B056E2B2DDAC0FD007EE38D /* AppDelegate.swift in Sources */, + 1B056E6C2DDADAA1007EE38D /* VPTabBar.swift in Sources */, + 1B056E5D2DDACD8E007EE38D /* UIFont+VPAdd.swift in Sources */, + 1B056E2C2DDAC0FD007EE38D /* SceneDelegate.swift in Sources */, + 1B056E462DDAC370007EE38D /* UIScreen+VPAdd.swift in Sources */, + 1B056E4D2DDAC7C1007EE38D /* VPTabBarController.swift in Sources */, + 1B056E4F2DDAC7FC007EE38D /* VPNavigationController.swift in Sources */, + 1B056E3F2DDAC2DB007EE38D /* VPCryptorService.swift in Sources */, + 1B056E5B2DDACD80007EE38D /* UIColor+VPAdd.swift in Sources */, + 1B056E6A2DDAD0BF007EE38D /* VPLocalizedManager.swift in Sources */, + 1B056E792DDB365A007EE38D /* VPTabBarItemSelectedView.swift in Sources */, + 1B056E722DDB022F007EE38D /* VPTabBarItem.swift in Sources */, + 1B056E412DDAC30A007EE38D /* VPModel.swift in Sources */, + 1B056E442DDAC355007EE38D /* UIDevice+VPAdd.swift in Sources */, + 1B056E512DDACBE5007EE38D /* VPViewController.swift in Sources */, + 1B056E492DDAC3DF007EE38D /* VPAppTool.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1B056E252DDAC0FD007EE38D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1B056E242DDAC0FD007EE38D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 1B056E622DDAD035007EE38D /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 1B056E632DDAD035007EE38D /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1B056E082DDABE2D007EE38D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 831DCE145EAEF22088BB06E4 /* Pods-Veloria.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = TWDZ3MP9DV; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Veloria/Source/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = ""; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.zeng.VideoPlayer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Veloria/Source/Veloria-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 1B056E092DDABE2D007EE38D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA827CC8ACC3AE70E33A0EEB /* Pods-Veloria.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = TWDZ3MP9DV; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Veloria/Source/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = ""; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.zeng.VideoPlayer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "Veloria/Source/Veloria-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 1B056E0A2DDABE2D007EE38D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 1B056E0B2DDABE2D007EE38D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1B056DEF2DDABE2B007EE38D /* Build configuration list for PBXProject "Veloria" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B056E0A2DDABE2D007EE38D /* Debug */, + 1B056E0B2DDABE2D007EE38D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1B056E072DDABE2D007EE38D /* Build configuration list for PBXNativeTarget "Veloria" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B056E082DDABE2D007EE38D /* Debug */, + 1B056E092DDABE2D007EE38D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1B056DEC2DDABE2B007EE38D /* Project object */; +} diff --git a/Veloria.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Veloria.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Veloria.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Veloria.xcworkspace/contents.xcworkspacedata b/Veloria.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..25ff2bf --- /dev/null +++ b/Veloria.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Veloria/AppDelegate/AppDelegate.swift b/Veloria/AppDelegate/AppDelegate.swift new file mode 100644 index 0000000..5739495 --- /dev/null +++ b/Veloria/AppDelegate/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + +// https://api-qjwl168.qjwl168.com/velo + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Veloria/AppDelegate/SceneDelegate.swift b/Veloria/AppDelegate/SceneDelegate.swift new file mode 100644 index 0000000..2d8d922 --- /dev/null +++ b/Veloria/AppDelegate/SceneDelegate.swift @@ -0,0 +1,55 @@ +// +// SceneDelegate.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + guard let windowScene = (scene as? UIWindowScene) else { return } + VPAppTool.windowScene = windowScene + + window = UIWindow(windowScene: windowScene) + window?.rootViewController = VPTabBarController() + window?.makeKeyAndVisible() + + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/Veloria/Base/Controller/VPNavigationController.swift b/Veloria/Base/Controller/VPNavigationController.swift new file mode 100644 index 0000000..160c0dc --- /dev/null +++ b/Veloria/Base/Controller/VPNavigationController.swift @@ -0,0 +1,44 @@ +// +// VPNavigationController.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + + } + + override func pushViewController(_ viewController: UIViewController, animated: Bool) { + if children.count > 0 { + viewController.hidesBottomBarWhenPushed = true + } + super.pushViewController(viewController, animated: animated) + } + + override func setViewControllers(_ viewControllers: [UIViewController], animated: Bool) { + for (index, value) in viewControllers.enumerated() { + if index != 0 { + value.hidesBottomBarWhenPushed = true + } + } + super.setViewControllers(viewControllers, animated: animated) + } + + + //MARK:-------------- 状态栏样式 -------------- + override var childForStatusBarStyle: UIViewController? { + return self.topViewController + } + + override var childForStatusBarHidden: UIViewController? { + return self.topViewController + } + +} diff --git a/Veloria/Base/Controller/VPTabBarController.swift b/Veloria/Base/Controller/VPTabBarController.swift new file mode 100644 index 0000000..e203a15 --- /dev/null +++ b/Veloria/Base/Controller/VPTabBarController.swift @@ -0,0 +1,110 @@ +// +// VPTabBarController.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit +import ESTabBarController_swift + +class VPTabBarController: UITabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + let tabBar = VPTabBar() + tabBar.delegate = self + self.setValue(tabBar, forKey: "tabBar") + +// ESTabBarController + vp_setup() +// self.tabBar.isTranslucent = false + + } + + + //MARK:-------------- 状态栏样式 -------------- + override var childForStatusBarStyle: UIViewController? { + return self.selectedViewController + } + + override var childForStatusBarHidden: UIViewController? { + return self.selectedViewController + } + +} + +extension VPTabBarController { + + private func vp_setup() { + let appearance = UITabBarAppearance() + + appearance.backgroundImage = UIImage(color: .clear) + appearance.backgroundColor = .red + appearance.shadowImage = UIImage() + appearance.shadowColor = .clear + tabBar.standardAppearance = appearance + tabBar.scrollEdgeAppearance = appearance + + + + let nav1 = createNavigationController(viewController: VPHomePageViewController(), title: "Home".localized, image: UIImage(named: ""), selectedImage: UIImage(named: "")) + let nav2 = createNavigationController(viewController: VPHomePageViewController(), title: "Home".localized, image: UIImage(named: ""), selectedImage: UIImage(named: "")) + let nav3 = createNavigationController(viewController: VPHomePageViewController(), title: "Home".localized, image: UIImage(named: ""), selectedImage: UIImage(named: "")) + let nav4 = createNavigationController(viewController: VPHomePageViewController(), title: "Home".localized, image: UIImage(named: ""), selectedImage: UIImage(named: "")) + + viewControllers = [nav1, nav2, nav3, nav4] + + } + + private func createNavigationController(viewController: UIViewController, title: String?, image: UIImage?, selectedImage: UIImage?) -> UINavigationController { + +// let tabBarContentView = VPTabBarItemContentView() +// let tabBarItem = ESTabBarItem(tabBarContentView, title: title, image: image, selectedImage: selectedImage) +// +// tabBarItem.contentView?.renderingMode = .alwaysOriginal +// tabBarItem.contentView?.textColor = .colorFFFFFF() +// tabBarItem.contentView?.highlightTextColor = .colorFFFFFF() +// tabBarItem.contentView?.titleLabel.font = .fontRegular(ofSize: 13) + + let tabBarItem = VPTabBarItem() + + let nav = VPNavigationController(rootViewController: viewController) +// nav.tabBarItem.title = title + nav.tabBarItem = tabBarItem + return nav + } + +} + +extension VPTabBarController { + + override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { + guard let idx = tabBar.items?.firstIndex(of: item) else { + return; + } +// if idx == tabBar.items!.count - 1, ESTabBarController.isShowingMore(self) { +// ignoreNextSelection = true +// selectedViewController = moreNavigationController +// return; +// } + if let vc = viewControllers?[idx] { +// ignoreNextSelection = true + selectedIndex = idx + delegate?.tabBarController?(self, didSelect: vc) + } + } + + override func tabBar(_ tabBar: UITabBar, willBeginCustomizing items: [UITabBarItem]) { + if let tabBar = tabBar as? VPTabBar { + tabBar.updateLayout() + } + } + + override func tabBar(_ tabBar: UITabBar, didEndCustomizing items: [UITabBarItem], changed: Bool) { + if let tabBar = tabBar as? VPTabBar { + tabBar.updateLayout() + } + } + +} diff --git a/Veloria/Base/Controller/VPViewController.swift b/Veloria/Base/Controller/VPViewController.swift new file mode 100644 index 0000000..37f92df --- /dev/null +++ b/Veloria/Base/Controller/VPViewController.swift @@ -0,0 +1,22 @@ +// +// VPViewController.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = .backgroundColor() + + } + + + + +} diff --git a/Veloria/Base/Define/VPDefine.swift b/Veloria/Base/Define/VPDefine.swift new file mode 100644 index 0000000..84d0589 --- /dev/null +++ b/Veloria/Base/Define/VPDefine.swift @@ -0,0 +1,19 @@ +// +// VPDefine.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + + + +//MARK: ------- 打印信息 ---------- +#if DEBUG +public func vpLog(message:Any? , file: String = #file, function: String = #function, line: Int = #line) { + print("\n\(Date(timeIntervalSinceNow: 8 * 60 * 60)) \(file.components(separatedBy: "/").last ?? "") \(function) \(line): \(message ?? "")") +} +#else +public func vpLog(message:Any?) { } +#endif diff --git a/Veloria/Base/Extension/UIColor+VPAdd.swift b/Veloria/Base/Extension/UIColor+VPAdd.swift new file mode 100644 index 0000000..2ddb164 --- /dev/null +++ b/Veloria/Base/Extension/UIColor+VPAdd.swift @@ -0,0 +1,36 @@ +// +// UIColor+VPAdd.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +extension UIColor { + static func backgroundColor() -> UIColor { + return color000000() + } +} + +extension UIColor { + static func colorFFFFFF(alpha: CGFloat = 1) -> UIColor { + return UIColor(rgb: 0xFFFFFF, alpha: alpha) + } + + static func color000000(alpha: CGFloat = 1) -> UIColor { + return UIColor(rgb: 0x000000, alpha: alpha) + } + + static func color7C174F(alpha: CGFloat = 1) -> UIColor { + return UIColor(rgb: 0x7C174F, alpha: alpha) + } + + static func color05CEA0(alpha: CGFloat = 1) -> UIColor { + return UIColor(rgb: 0x05CEA0, alpha: alpha) + } + + static func color353537(alpha: CGFloat = 1) -> UIColor { + return UIColor(rgb: 0x353537, alpha: alpha) + } +} diff --git a/Veloria/Base/Extension/UIDevice+VPAdd.swift b/Veloria/Base/Extension/UIDevice+VPAdd.swift new file mode 100644 index 0000000..0ce6a09 --- /dev/null +++ b/Veloria/Base/Extension/UIDevice+VPAdd.swift @@ -0,0 +1,10 @@ +// +// UIDevice+VPAdd.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + + diff --git a/Veloria/Base/Extension/UIFont+VPAdd.swift b/Veloria/Base/Extension/UIFont+VPAdd.swift new file mode 100644 index 0000000..ba05f5d --- /dev/null +++ b/Veloria/Base/Extension/UIFont+VPAdd.swift @@ -0,0 +1,34 @@ +// +// UIFont+VPAdd.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +extension UIFont { + static func regularFontName() -> String { + return ".AppleSystemUIFont" + } + + static func mediumFontName() -> String { + return ".AppleSystemUIFontMedium" + } + + static func boldFontName() -> String { + return ".AppleSystemUIFontBold" + } + + static func fontRegular(ofSize: CGFloat) -> UIFont { + return .systemFont(ofSize: ofSize, weight: .regular) + } + + static func fontMedium(ofSize: CGFloat) -> UIFont { + return .systemFont(ofSize: ofSize, weight: .medium) + } + + static func fontBold(ofSize: CGFloat) -> UIFont { + return .systemFont(ofSize: ofSize, weight: .bold) + } +} diff --git a/Veloria/Base/Extension/UIScreen+VPAdd.swift b/Veloria/Base/Extension/UIScreen+VPAdd.swift new file mode 100644 index 0000000..101fdcb --- /dev/null +++ b/Veloria/Base/Extension/UIScreen+VPAdd.swift @@ -0,0 +1,52 @@ +// +// UIScreen+VPAdd.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +extension UIScreen { + + static var screen: UIScreen { + if let screen = VPAppTool.windowScene?.screen { + return screen + } else { + return UIScreen.main + } + } + + static var width: CGFloat { + return screen.bounds.width + } + + static var height: CGFloat { + return screen.bounds.height + } + + static var statusBarHeight: CGFloat { + let top = VPAppTool.windowScene?.windows.first?.safeAreaInsets.top ?? 20 +// top = (top != 59) ? top : 54 //灵动岛 +// top = top == 0 ? 20 : top + return top + } + + static var tabbarSafeBottomMargin: CGFloat { + let bottom = VPAppTool.windowScene?.windows.first?.safeAreaInsets.bottom ?? 0 + return bottom + } + + static var navBarHeight: CGFloat { + return statusBarHeight + 44 + } + + static var tabBarHeight: CGFloat { + return tabbarSafeBottomMargin + 49 + } + + static var customTabBarHeight: CGFloat { + return tabbarSafeBottomMargin + 74 + } + +} diff --git a/Veloria/Base/Extension/UIView+VPAdd.swift b/Veloria/Base/Extension/UIView+VPAdd.swift new file mode 100644 index 0000000..7ce825f --- /dev/null +++ b/Veloria/Base/Extension/UIView+VPAdd.swift @@ -0,0 +1,13 @@ +// +// UIView+VPAdd.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit +import SnapKit + +extension UIView { + +} diff --git a/Veloria/Base/Model/VPModel.swift b/Veloria/Base/Model/VPModel.swift new file mode 100644 index 0000000..89f8a2b --- /dev/null +++ b/Veloria/Base/Model/VPModel.swift @@ -0,0 +1,16 @@ +// +// VPModel.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPModel: NSObject { + + override init() { + super.init() + } + +} diff --git a/Veloria/Base/Networking/Base/VPCryptorService.swift b/Veloria/Base/Networking/Base/VPCryptorService.swift new file mode 100644 index 0000000..1ae7791 --- /dev/null +++ b/Veloria/Base/Networking/Base/VPCryptorService.swift @@ -0,0 +1,101 @@ +// +// VPCryptorService.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPCryptorService: NSObject { + // 定义常量 + static let EN_STR_TAG: String = "$" // 替换为实际的加密标记 + + // 解密字符串 + static func decrypt(data: String) -> String { + guard data.hasPrefix(EN_STR_TAG) else { +// fatalError("Invalid encoded string") + return data + } + + let decryptedData = deStrBytes(data: data) + return String(data: decryptedData, encoding: .utf8) ?? "" + } + + // 从十六进制字符串解密字节 + static func deStrBytes(data: String) -> Data { + + let hexData = String(data.dropFirst()) + var bytes = Data() + + var index = hexData.startIndex + while index < hexData.endIndex { + let nextIndex = hexData.index(index, offsetBy: 2, limitedBy: hexData.endIndex) ?? hexData.endIndex + let byteString = String(hexData[index.. Data { + guard !data.isEmpty else { + return data + } + + let saltLen = Int(data[data.startIndex]) + guard data.count >= 1 + saltLen else { + return data + } + + let salt = data.subdata(in: 1..<1+saltLen) + let encryptedData = data.subdata(in: 1+saltLen.. Data { + let decryptedData = cxEd(data: data) + return removeSalt(data: decryptedData, salt: salt) + } + + // 加密/解密数据(按位取反) + static func cxEd(data: Data) -> Data { + return Data(data.map { $0 ^ 0xFF }) + } + + // 从数据中移除盐值 + static func removeSalt(data: Data, salt: Data) -> Data { + guard !salt.isEmpty else { + return data + } + + var result = Data() + let saltBytes = [UInt8](salt) + let saltCount = saltBytes.count + + for (index, byte) in data.enumerated() { + let saltByte = saltBytes[index % saltCount] + let decryptedByte = calRemoveSalt(v: byte, s: saltByte) + result.append(decryptedByte) + } + + return result + } + + // 计算移除盐值后的字节 + static func calRemoveSalt(v: UInt8, s: UInt8) -> UInt8 { + if v >= s { + return v - s + } else { + return UInt8(0xFF) - (s - v) + 1 + } + } +} diff --git a/Veloria/Base/View/TabBar/VPTabBar.swift b/Veloria/Base/View/TabBar/VPTabBar.swift new file mode 100644 index 0000000..c59c805 --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBar.swift @@ -0,0 +1,209 @@ +// +// VPTabBar.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPTabBar: UITabBar { + static let itemCount = 4 + static let itmeMargin: CGFloat = 15 + static let itemSpacing: CGFloat = 11 + static let itemMinWidth = 54.0 + static let itemMaxWidth = UIScreen.width - (itemMinWidth + itemSpacing) * CGFloat(itemCount - 1) - itmeMargin * 2 + static let animateDuration: TimeInterval = 0.3 + + override func sizeThatFits(_ size: CGSize) -> CGSize { + var size = super.sizeThatFits(size) + size.height = UIScreen.customTabBarHeight + return size + } + + private let tagOffset = 1000 + + override var items: [UITabBarItem]? { + didSet { + reload() + } + } + + var containers = [VPTabBarItemContainer]() + + + override func layoutSubviews() { + super.layoutSubviews() +// self.updateLayout() + } + + override func setItems(_ items: [UITabBarItem]?, animated: Bool) { + super.setItems(items, animated: animated) + self.reload() + } + + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + var b = super.point(inside: point, with: event) + if !b { + for container in containers { + let p = CGPoint.init(x: point.x - container.frame.origin.x, y: point.y - container.frame.origin.y) + if container.point(inside: p, with: event) { + b = true + } + } + } + return b + } + +} + +extension VPTabBar { + func updateLayout() { + subviews.forEach { + if let cls = NSClassFromString("UITabBarButton") { + if $0.isKind(of: cls) == true { + $0.isHidden = true + } + } + } + + var index = 0 + containers.forEach { + if $0.contentView == (selectedItem as? VPTabBarItem)?.contentView { + index = $0.tag - tagOffset + } + } + updateSelectedStatus(index: index, animated: false) + + } + + + ///更新选中状态 + private func updateSelectedStatus(index: Int, animated: Bool) { + let margin: CGFloat = Self.itmeMargin + let itemSpacing: CGFloat = Self.itemSpacing + + let itemHeight = Self.itemMinWidth + let itemMinWidth = Self.itemMinWidth + let itemMaxWidth = Self.itemMaxWidth + var x = margin + + containers.forEach { + if $0.tag == index + tagOffset { +// $0.frame = CGRect(x: x, y: 10, width: itemMaxWidth, height: itemHeight) + $0.snp.remakeConstraints { make in + make.left.equalTo(x) + make.top.equalTo(10) + make.width.equalTo(itemMaxWidth) + make.height.equalTo(itemHeight) + } + x += (itemMaxWidth + itemSpacing) + } else { +// $0.frame = CGRect(x: x, y: 10, width: itemMinWidth, height: itemHeight) + $0.snp.remakeConstraints { make in + make.left.equalTo(x) + make.top.equalTo(10) + make.width.equalTo(itemMinWidth) + make.height.equalTo(itemHeight) + } + x += (itemMinWidth + itemSpacing) + } + } + + if animated { + UIView.animate(withDuration: Self.animateDuration) { + self.layoutIfNeeded() + } + } + + } +} + +extension VPTabBar { + func removeAll() { + for container in containers { + container.removeFromSuperview() + } + containers.removeAll() + } + + func reload() { + guard let items = self.items else { return } + + + items.enumerated().forEach { (index, item) in + let container = VPTabBarItemContainer(self, tag: index + tagOffset) + addSubview(container) + + if let item = item as? VPTabBarItem { + container.contentView = item.contentView + } + containers.append(container) + } + updateLayout() + + self.setNeedsLayout() + + } + + @objc func highlightAction(_ sender: AnyObject?) { + guard let container = sender as? VPTabBarItemContainer else { + return + } + let newIndex = max(0, container.tag - tagOffset) + guard newIndex < items?.count ?? 0, let item = self.items?[newIndex], item.isEnabled == true else { + return + } + + if let item = item as? VPTabBarItem { + item.contentView.highlight(animated: true, completion: nil) + } + } + + @objc func dehighlightAction(_ sender: AnyObject?) { + guard let container = sender as? VPTabBarItemContainer else { + return + } + let newIndex = max(0, container.tag - tagOffset) + guard newIndex < items?.count ?? 0, let item = self.items?[newIndex], item.isEnabled == true else { + return + } + + if let item = item as? VPTabBarItem { + item.contentView.dehighlight(animated: true, completion: nil) + } + } + + @objc func selectAction(_ sender: AnyObject?) { + guard let container = sender as? VPTabBarItemContainer else { + return + } + select(itemAtIndex: container.tag - tagOffset, animated: true) + } + + @objc func select(itemAtIndex idx: Int, animated: Bool) { + let newIndex = max(0, idx) + let currentIndex = (selectedItem != nil) ? (items?.firstIndex(of: selectedItem!) ?? -1) : -1 + guard newIndex < items?.count ?? 0, let item = self.items?[newIndex], item.isEnabled == true else { + return + } + + if currentIndex != newIndex { + if currentIndex != -1 && currentIndex < items?.count ?? 0{ + if let currentItem = items?[currentIndex] as? VPTabBarItem { + currentItem.contentView.deselect(animated: animated, completion: nil) + } + } + if let item = item as? VPTabBarItem { + item.contentView.select(animated: animated, completion: nil) + } + } else if currentIndex == newIndex { + if let item = item as? VPTabBarItem { + item.contentView.reselect(animated: animated, completion: nil) + } + } + updateSelectedStatus(index: newIndex, animated: animated) + + delegate?.tabBar?(self, didSelect: item) + } +} diff --git a/Veloria/Base/View/TabBar/VPTabBarItem.swift b/Veloria/Base/View/TabBar/VPTabBarItem.swift new file mode 100644 index 0000000..9689648 --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBarItem.swift @@ -0,0 +1,28 @@ +// +// VPTabBarItem.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPTabBarItem: UITabBarItem { + + private(set) var contentView: VPTabBarItemContentView + + + public init(_ contentView: VPTabBarItemContentView = VPTabBarItemContentView(), title: String? = nil, image: UIImage? = nil, selectedImage: UIImage? = nil, tag: Int = 0) { + self.contentView = contentView + super.init() + + self.title = title + self.image = image + self.selectedImage = selectedImage + self.tag = tag + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/Veloria/Base/View/TabBar/VPTabBarItemContainer.swift b/Veloria/Base/View/TabBar/VPTabBarItemContainer.swift new file mode 100644 index 0000000..70635bb --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBarItemContainer.swift @@ -0,0 +1,57 @@ +// +// VPTabBarItemContainer.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPTabBarItemContainer: UIControl { + + var contentView: VPTabBarItemContentView? { + didSet { + oldValue?.removeFromSuperview() + + if let contentView = contentView { + addSubview(contentView) + } + } + } + + internal init(_ target: AnyObject?, tag: Int) { + super.init(frame: CGRect.zero) + self.tag = tag + self.addTarget(target, action: #selector(VPTabBar.selectAction(_:)), for: .touchUpInside) + self.addTarget(target, action: #selector(VPTabBar.highlightAction(_:)), for: .touchDown) + self.addTarget(target, action: #selector(VPTabBar.highlightAction(_:)), for: .touchDragEnter) + self.addTarget(target, action: #selector(VPTabBar.dehighlightAction(_:)), for: .touchDragExit) + self.backgroundColor = .clear +// self.isAccessibilityElement = true + } + + internal required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + internal override func layoutSubviews() { + super.layoutSubviews() + if let contentView = contentView { + contentView.frame = self.bounds + contentView.updateLayout() + } + } + + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + var b = super.point(inside: point, with: event) + if !b { + for subview in self.subviews { + if subview.point(inside: CGPoint.init(x: point.x - subview.frame.origin.x, y: point.y - subview.frame.origin.y), with: event) { + b = true + } + } + } + return b + } + +} diff --git a/Veloria/Base/View/TabBar/VPTabBarItemContentView.swift b/Veloria/Base/View/TabBar/VPTabBarItemContentView.swift new file mode 100644 index 0000000..2006870 --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBarItemContentView.swift @@ -0,0 +1,180 @@ +// +// VPTabBarItemContentView.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit +import ESTabBarController_swift + +class VPTabBarItemContentView: UIView { + + /// 是否被选中 + open var selected = false + + /// 是否处于高亮状态 + open var highlighted = false + + /// 是否支持高亮 + open var highlightEnabled = true + + + private lazy var normalView: VPTabBarItemNormalVew = { + let view = VPTabBarItemNormalVew() + view.isHidden = false + return view + }() + + private lazy var selectedView: VPTabBarItemSelectedView = { + let view = VPTabBarItemSelectedView() + view.isHidden = true + return view + }() + + override init(frame: CGRect) { + super.init(frame: frame) + backgroundColor = .yellow + self.isUserInteractionEnabled = false + self.layer.masksToBounds = true + + addSubview(normalView) + addSubview(selectedView) + + normalView.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.height.equalTo(VPTabBar.itemMinWidth) + } + + selectedView.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.equalTo(VPTabBar.itemMaxWidth) + make.height.equalTo(VPTabBar.itemMinWidth) + } + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + open func updateDisplay() { + +// imageView.image = (selected ? (selectedImage ?? image) : image)?.withRenderingMode(renderingMode) +// imageView.tintColor = selected ? highlightIconColor : iconColor +// titleLabel.textColor = selected ? highlightTextColor : textColor +// backgroundColor = selected ? highlightBackdropColor : backdropColor + } + + func updateLayout() { + normalView.isHidden = selected + selectedView.isHidden = !selected + + } +} + +extension VPTabBarItemContentView { + + // MARK: - INTERNAL METHODS + internal final func select(animated: Bool, completion: (() -> ())?) { + selected = true + if highlightEnabled && highlighted { + highlighted = false + dehighlightAnimation(animated: animated, completion: { [weak self] in + self?.updateDisplay() + self?.selectAnimation(animated: animated, completion: completion) + }) + } else { + updateDisplay() + selectAnimation(animated: animated, completion: completion) + } + } + + internal final func deselect(animated: Bool, completion: (() -> ())?) { + selected = false + updateDisplay() + self.deselectAnimation(animated: animated, completion: completion) + } + + internal final func reselect(animated: Bool, completion: (() -> ())?) { + if selected == false { + select(animated: animated, completion: completion) + } else { + if highlightEnabled && highlighted { + highlighted = false + dehighlightAnimation(animated: animated, completion: { [weak self] in + self?.reselectAnimation(animated: animated, completion: completion) + }) + } else { + reselectAnimation(animated: animated, completion: completion) + } + } + } + + internal final func highlight(animated: Bool, completion: (() -> ())?) { + if !highlightEnabled { + return + } + if highlighted == true { + return + } + highlighted = true + self.highlightAnimation(animated: animated, completion: completion) + } + + internal final func dehighlight(animated: Bool, completion: (() -> ())?) { + if !highlightEnabled { + return + } + if !highlighted { + return + } + highlighted = false + self.dehighlightAnimation(animated: animated, completion: completion) + } + + internal func badgeChanged(animated: Bool, completion: (() -> ())?) { + self.badgeChangedAnimation(animated: animated, completion: completion) + } + + // MARK: - ANIMATION METHODS + func selectAnimation(animated: Bool, completion: (() -> ())?) { + self.selectedView.isHidden = false + self.normalView.isHidden = true + + +// UIView.animate(withDuration: VPTabBar.animateDuration) { +// +// +// +// } completion: { finish in +// <#code#> +// } + + + + + completion?() + } + + func deselectAnimation(animated: Bool, completion: (() -> ())?) { + self.selectedView.isHidden = true + self.normalView.isHidden = false + completion?() + } + + func reselectAnimation(animated: Bool, completion: (() -> ())?) { + completion?() + } + + func highlightAnimation(animated: Bool, completion: (() -> ())?) { + completion?() + } + + func dehighlightAnimation(animated: Bool, completion: (() -> ())?) { + completion?() + } + + func badgeChangedAnimation(animated: Bool, completion: (() -> ())?) { + completion?() + } +} diff --git a/Veloria/Base/View/TabBar/VPTabBarItemNormalVew.swift b/Veloria/Base/View/TabBar/VPTabBarItemNormalVew.swift new file mode 100644 index 0000000..ae756af --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBarItemNormalVew.swift @@ -0,0 +1,42 @@ +// +// VPTabBarItemNormalVew.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPTabBarItemNormalVew: UIView { + + var image: UIImage? { + didSet { + imageView.image = image + } + } + + private lazy var imageView: UIImageView = { + let imageView = UIImageView() + return imageView + }() + + override init(frame: CGRect) { + super.init(frame: frame) + self.backgroundColor = .colorFFFFFF(alpha: 0.1) + self.layer.cornerRadius = VPTabBar.itemMinWidth / 2 + self.layer.masksToBounds = true + + addSubview(imageView) + + imageView.snp.makeConstraints { make in + make.center.equalToSuperview() + } + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + + diff --git a/Veloria/Base/View/TabBar/VPTabBarItemSelectedView.swift b/Veloria/Base/View/TabBar/VPTabBarItemSelectedView.swift new file mode 100644 index 0000000..8787759 --- /dev/null +++ b/Veloria/Base/View/TabBar/VPTabBarItemSelectedView.swift @@ -0,0 +1,54 @@ +// +// VPTabBarItemSelectedView.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPTabBarItemSelectedView: VPGradientView { + + private lazy var contentView: UIView = { + let view = UIView() + view.backgroundColor = .color353537() + view.layer.cornerRadius = VPTabBar.itemMinWidth / 2 - 3 + view.layer.masksToBounds = true + return view + }() + + override init(frame: CGRect) { + super.init(frame: frame) + colors = [UIColor.color7C174F().cgColor, UIColor.color05CEA0().cgColor] + locations = [0, 1] + startPoint = .init(x: 0, y: 0.5) + endPoint = .init(x: 1, y: 0.5) + + layer.cornerRadius = VPTabBar.itemMinWidth / 2 + layer.masksToBounds = true + + vp_setupUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + + +} + +extension VPTabBarItemSelectedView { + + private func vp_setupUI() { + addSubview(contentView) + + contentView.snp.makeConstraints { make in + make.left.equalToSuperview().offset(3) + make.top.equalToSuperview().offset(3) + make.center.equalToSuperview() + } + + } + +} diff --git a/Veloria/Base/View/VPGradientView.swift b/Veloria/Base/View/VPGradientView.swift new file mode 100644 index 0000000..76cf4ea --- /dev/null +++ b/Veloria/Base/View/VPGradientView.swift @@ -0,0 +1,44 @@ +// +// VPGradientView.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPGradientView: UIView { + + override class var layerClass: AnyClass { + return CAGradientLayer.self + } + + var gradientLayer: CAGradientLayer { + return self.layer as! CAGradientLayer + } + + var locations: [NSNumber]? { + didSet { + self.gradientLayer.locations = locations + } + } + + var colors: [CGColor]? { + didSet { + self.gradientLayer.colors = colors + } + } + + var startPoint: CGPoint = .zero { + didSet { + self.gradientLayer.startPoint = startPoint + } + } + + var endPoint: CGPoint = .zero { + didSet { + self.gradientLayer.endPoint = endPoint + } + } + +} diff --git a/Veloria/Class/Home/Controller/VPHomePageViewController.swift b/Veloria/Class/Home/Controller/VPHomePageViewController.swift new file mode 100644 index 0000000..4844608 --- /dev/null +++ b/Veloria/Class/Home/Controller/VPHomePageViewController.swift @@ -0,0 +1,22 @@ +// +// VPHomePageViewController.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPHomePageViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + + + } + + + + +} diff --git a/Veloria/Libs/AppTool/VPAppTool.swift b/Veloria/Libs/AppTool/VPAppTool.swift new file mode 100644 index 0000000..6aceb05 --- /dev/null +++ b/Veloria/Libs/AppTool/VPAppTool.swift @@ -0,0 +1,13 @@ +// +// VPAppTool.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPAppTool: NSObject { + + static var windowScene: UIWindowScene? +} diff --git a/Veloria/Libs/LocalizedManager/VPLocalizedManager.swift b/Veloria/Libs/LocalizedManager/VPLocalizedManager.swift new file mode 100644 index 0000000..d289701 --- /dev/null +++ b/Veloria/Libs/LocalizedManager/VPLocalizedManager.swift @@ -0,0 +1,131 @@ +// +// VPLocalizedManager.swift +// Veloria +// +// Created by 佳尔 on 2025/5/19. +// + +import UIKit + +class VPLocalizedManager: NSObject { + + static let shared = VPLocalizedManager() + private let LocalizedUserDefaultsKey = "VPLocalizedManager.LocalizedUserDefaultsKey" + private let LocalizedDataUserDefaultsKey = "VPLocalizedManager.LocalizedDataUserDefaultsKey" + private let LocalizedDataLocalizedKeyUserDefaultsKey = "VPLocalizedManager.LocalizedDataLocalizedKeyUserDefaultsKey" + + ///语言列表 +// var languageList: [SPLanguageModel]? + + ///多语言数据 + private(set) lazy var localizedData: [String : String]? = UserDefaults.standard.object(forKey: LocalizedDataUserDefaultsKey) as? [String : String] + { + didSet { + UserDefaults.standard.set(localizedData, forKey: LocalizedDataUserDefaultsKey) + UserDefaults.standard.synchronize() + } + } + ///当前语言数据对应的key + private(set) lazy var localizedDataLocalizedKey: String? = UserDefaults.standard.object(forKey: LocalizedDataLocalizedKeyUserDefaultsKey) as? String + { + didSet { + UserDefaults.standard.set(localizedDataLocalizedKey, forKey: LocalizedDataLocalizedKeyUserDefaultsKey) + UserDefaults.standard.synchronize() + } + } + + // 获取当前语言代码(如果用户未手动设置,则返回系统语言) + var currentLocalizedKey: String { + get { + var key = (UserDefaults.standard.string(forKey: LocalizedUserDefaultsKey) ?? Locale.preferredLanguages.first) ?? "en" + if key.contains("zh-Hans") { + key = "zh" + } else if key.contains("zh-Hant") { + key = "zh_hk" + } else { + let arr = key.components(separatedBy: "-") + key = arr.first ?? "en" + } + return key + } + set { + UserDefaults.standard.set(newValue, forKey: LocalizedUserDefaultsKey) + UserDefaults.standard.synchronize() + } + } + + var mjLocalizedKey: String { + let key = currentLocalizedKey + if key == "zh" { + return "zh-Hans" + } else if key == "zh_hk" { + return "zh-Hant" + } + return key + } + + // 判断是否跟随系统 + var isFollowingSystem: Bool { + return UserDefaults.standard.string(forKey: LocalizedUserDefaultsKey) == nil + } + + // 还原为系统默认语言 + func resetToSystemLanguage() { + UserDefaults.standard.removeObject(forKey: LocalizedUserDefaultsKey) + UserDefaults.standard.synchronize() + } + + // 获取本地化字符串 + func localizedString(forKey key: String, tableName: String? = nil) -> String { + if let localizedData = localizedData, + let text = localizedData[key] { + return text + + } else if let selectedLanguage = UserDefaults.standard.string(forKey: LocalizedUserDefaultsKey), + let bundlePath = Bundle.main.path(forResource: selectedLanguage, ofType: "lproj"), + let bundle = Bundle(path: bundlePath) { + + return bundle.localizedString(forKey: key, value: nil, table: tableName) + } else { + return NSLocalizedString(key, tableName: tableName, bundle: .main, value: "", comment: "") + } + } + +} + +extension VPLocalizedManager { + ///获取本地化数据 + func updateLocalizedData(key: String = VPLocalizedManager.shared.currentLocalizedKey, completer: ((_ finish: Bool) -> Void)?) { +// SPSettingAPI.requestLocalizedData(key: key) { [weak self] model in +// guard let self = self else { return } +// guard let model = model else { +// completer?(false) +// return +// } +// if let languageList = model.languages, languageList.count > 0 { +// self.languageList = languageList +// } +// +// if let localizedData = model.translates { +// self.localizedDataLocalizedKey = key +// self.localizedData = localizedData +// completer?(true) +// } else { +// completer?(false) +// } +// } + } +} + +extension VPLocalizedManager { + + static let localizedDidChange = Notification.Name(rawValue: "VPLocalizedManager.localizedDidChange") + +} + +extension String { + var localized: String { + return VPLocalizedManager.shared.localizedString(forKey: self) + } +} + diff --git a/Veloria/Source/Assets.xcassets/AccentColor.colorset/Contents.json b/Veloria/Source/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Veloria/Source/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Veloria/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/Veloria/Source/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/Veloria/Source/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Veloria/Source/Assets.xcassets/Contents.json b/Veloria/Source/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Veloria/Source/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Veloria/Source/Base.lproj/LaunchScreen.storyboard b/Veloria/Source/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Veloria/Source/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Veloria/Source/Info.plist b/Veloria/Source/Info.plist new file mode 100644 index 0000000..0eb786d --- /dev/null +++ b/Veloria/Source/Info.plist @@ -0,0 +1,23 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/Veloria/Source/Veloria-Bridging-Header.h b/Veloria/Source/Veloria-Bridging-Header.h new file mode 100644 index 0000000..437f1c3 --- /dev/null +++ b/Veloria/Source/Veloria-Bridging-Header.h @@ -0,0 +1,5 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import diff --git a/Veloria/Source/en.lproj/Localizable.strings b/Veloria/Source/en.lproj/Localizable.strings new file mode 100644 index 0000000..1912621 --- /dev/null +++ b/Veloria/Source/en.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + VideoPlayer + + Created by 佳尔 on 2025/5/19. + +*/ + +"Home" = "Home";