From e83f58454f1c6565574e66ec4c4e423dff0b23ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=86=E6=B5=B716?= <> Date: Mon, 22 Jul 2024 15:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 22 + WallpaperHD_Live.xcodeproj/project.pbxproj | 643 + WallpaperHD_Live/AppDelegate.swift | 26 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + .../home_n.imageset/Contents.json | 21 + .../home_n.imageset/home (1).png | Bin 0 -> 1963 bytes .../home_s.imageset/Contents.json | 21 + .../Assets.xcassets/home_s.imageset/home.png | Bin 0 -> 1978 bytes .../ic_arrow_left.imageset/Contents.json | 21 + .../ic_arrow_left.imageset/ic_arrow_left.png | Bin 0 -> 466 bytes .../mine_n.imageset/Contents.json | 21 + .../mine_n.imageset/mine (1).png | Bin 0 -> 2757 bytes .../mine_s.imageset/Contents.json | 21 + .../Assets.xcassets/mine_s.imageset/mine.png | Bin 0 -> 2657 bytes .../rank_n.imageset/Contents.json | 21 + .../rank_n.imageset/ranking (1).png | Bin 0 -> 704 bytes .../rank_s.imageset/Contents.json | 21 + .../rank_s.imageset/ranking.png | Bin 0 -> 678 bytes .../Header/wallpaperLive_Header.h | 14 + WallpaperHD_Live/Header/waperLivePCH.pch | 14 + WallpaperHD_Live/Home/C/WP_Christmas.swift | 165 + WallpaperHD_Live/Home/C/WP_Christmas.xib | 50 + WallpaperHD_Live/Home/C/WP_FlowersVC.swift | 162 + WallpaperHD_Live/Home/C/WP_FlowersVC.xib | 50 + WallpaperHD_Live/Home/C/WP_HomeVC.swift | 87 + WallpaperHD_Live/Home/C/WP_HomeVC.xib | 46 + WallpaperHD_Live/Home/C/WP_NewestVC.swift | 163 + WallpaperHD_Live/Home/C/WP_NewestVC.xib | 50 + WallpaperHD_Live/Home/C/WP_PopularVC.swift | 166 + WallpaperHD_Live/Home/C/WP_PopularVC.xib | 50 + WallpaperHD_Live/Home/M/WallpaperModel.swift | 41 + .../Home/V/WP_WallpaperCollectionCell.swift | 19 + .../Home/V/WP_WallpaperCollectionCell.xib | 38 + WallpaperHD_Live/Info.plist | 11 + WallpaperHD_Live/Mine/C/WP_MineVC.swift | 18 + WallpaperHD_Live/Mine/C/WP_MineVC.xib | 22 + WallpaperHD_Live/Ranking/C/WP_RankingVC.swift | 18 + WallpaperHD_Live/Ranking/C/WP_RankingVC.xib | 22 + WallpaperHD_Live/Root/WP_RootNAV.swift | 69 + WallpaperHD_Live/Root/WP_RootVC.swift | 66 + WallpaperHD_Live/Root/WP_TabBarVC.swift | 18 + WallpaperHD_Live/Root/WP_TabButton.swift | 89 + WallpaperHD_Live/Root/WP_TabbarCommon.swift | 97 + .../Tool/CustomCollectionViewFlowLayout.swift | 23 + WallpaperHD_Live/Tool/colorManager.swift | 59 + WallpaperHD_Live/Tool/my_wallpaper.json | 11832 ++++++++++++++++ WallpaperHD_Live/ViewController.swift | 19 + 49 files changed, 14346 insertions(+) create mode 100644 Podfile create mode 100644 WallpaperHD_Live.xcodeproj/project.pbxproj create mode 100644 WallpaperHD_Live/AppDelegate.swift create mode 100644 WallpaperHD_Live/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/home_n.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/home_n.imageset/home (1).png create mode 100644 WallpaperHD_Live/Assets.xcassets/home_s.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/home_s.imageset/home.png create mode 100644 WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/ic_arrow_left.png create mode 100644 WallpaperHD_Live/Assets.xcassets/mine_n.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/mine_n.imageset/mine (1).png create mode 100644 WallpaperHD_Live/Assets.xcassets/mine_s.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/mine_s.imageset/mine.png create mode 100644 WallpaperHD_Live/Assets.xcassets/rank_n.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/rank_n.imageset/ranking (1).png create mode 100644 WallpaperHD_Live/Assets.xcassets/rank_s.imageset/Contents.json create mode 100644 WallpaperHD_Live/Assets.xcassets/rank_s.imageset/ranking.png create mode 100644 WallpaperHD_Live/Header/wallpaperLive_Header.h create mode 100644 WallpaperHD_Live/Header/waperLivePCH.pch create mode 100644 WallpaperHD_Live/Home/C/WP_Christmas.swift create mode 100644 WallpaperHD_Live/Home/C/WP_Christmas.xib create mode 100644 WallpaperHD_Live/Home/C/WP_FlowersVC.swift create mode 100644 WallpaperHD_Live/Home/C/WP_FlowersVC.xib create mode 100644 WallpaperHD_Live/Home/C/WP_HomeVC.swift create mode 100644 WallpaperHD_Live/Home/C/WP_HomeVC.xib create mode 100644 WallpaperHD_Live/Home/C/WP_NewestVC.swift create mode 100644 WallpaperHD_Live/Home/C/WP_NewestVC.xib create mode 100644 WallpaperHD_Live/Home/C/WP_PopularVC.swift create mode 100644 WallpaperHD_Live/Home/C/WP_PopularVC.xib create mode 100644 WallpaperHD_Live/Home/M/WallpaperModel.swift create mode 100644 WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.swift create mode 100644 WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.xib create mode 100644 WallpaperHD_Live/Info.plist create mode 100644 WallpaperHD_Live/Mine/C/WP_MineVC.swift create mode 100644 WallpaperHD_Live/Mine/C/WP_MineVC.xib create mode 100644 WallpaperHD_Live/Ranking/C/WP_RankingVC.swift create mode 100644 WallpaperHD_Live/Ranking/C/WP_RankingVC.xib create mode 100644 WallpaperHD_Live/Root/WP_RootNAV.swift create mode 100644 WallpaperHD_Live/Root/WP_RootVC.swift create mode 100644 WallpaperHD_Live/Root/WP_TabBarVC.swift create mode 100644 WallpaperHD_Live/Root/WP_TabButton.swift create mode 100644 WallpaperHD_Live/Root/WP_TabbarCommon.swift create mode 100644 WallpaperHD_Live/Tool/CustomCollectionViewFlowLayout.swift create mode 100644 WallpaperHD_Live/Tool/colorManager.swift create mode 100644 WallpaperHD_Live/Tool/my_wallpaper.json create mode 100644 WallpaperHD_Live/ViewController.swift diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..e2d61ab --- /dev/null +++ b/Podfile @@ -0,0 +1,22 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'WallpaperHD_Live' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + pod 'SnapKit' + #pod 'AFNetworking' + pod 'SDWebImage' + pod 'IQKeyboardManagerSwift' + pod 'BRPickerView' + pod 'Alamofire' + pod 'FSPagerView' + pod 'SVProgressHUD' + pod 'CYLTabBarController' + pod 'GYSide' + pod 'JXSegmentedView' + pod 'MJExtension' + pod 'MJRefresh' + +end diff --git a/WallpaperHD_Live.xcodeproj/project.pbxproj b/WallpaperHD_Live.xcodeproj/project.pbxproj new file mode 100644 index 0000000..810fae6 --- /dev/null +++ b/WallpaperHD_Live.xcodeproj/project.pbxproj @@ -0,0 +1,643 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 20E56B217F7725712DE82B32 /* Pods_WallpaperHD_Live.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */; }; + 75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4269F2C4E092C001844C2 /* AppDelegate.swift */; }; + 75B426A42C4E092C001844C2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426A32C4E092C001844C2 /* ViewController.swift */; }; + 75B426A72C4E092C001844C2 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75B426A62C4E092C001844C2 /* Base */; }; + 75B426A92C4E092F001844C2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 75B426A82C4E092F001844C2 /* Assets.xcassets */; }; + 75B426AC2C4E092F001844C2 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75B426AB2C4E092F001844C2 /* Base */; }; + 75B426B42C4E0CF5001844C2 /* WP_RootVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426B32C4E0CF5001844C2 /* WP_RootVC.swift */; }; + 75B426B82C4E0D21001844C2 /* WP_RootNAV.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426B72C4E0D21001844C2 /* WP_RootNAV.swift */; }; + 75B426BE2C4E1046001844C2 /* WP_TabButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426BC2C4E1046001844C2 /* WP_TabButton.swift */; }; + 75B426BF2C4E1046001844C2 /* WP_TabbarCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426BD2C4E1046001844C2 /* WP_TabbarCommon.swift */; }; + 75B426C12C4E10D7001844C2 /* WP_TabBarVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426C02C4E10D7001844C2 /* WP_TabBarVC.swift */; }; + 75B426CA2C4E2B25001844C2 /* WP_HomeVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426C92C4E2B25001844C2 /* WP_HomeVC.xib */; }; + 75B426CB2C4E2B25001844C2 /* WP_HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426C82C4E2B25001844C2 /* WP_HomeVC.swift */; }; + 75B426CE2C4E2B31001844C2 /* WP_RankingVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426CD2C4E2B31001844C2 /* WP_RankingVC.xib */; }; + 75B426CF2C4E2B31001844C2 /* WP_RankingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426CC2C4E2B31001844C2 /* WP_RankingVC.swift */; }; + 75B426D22C4E2B49001844C2 /* WP_MineVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426D12C4E2B49001844C2 /* WP_MineVC.xib */; }; + 75B426D32C4E2B49001844C2 /* WP_MineVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426D02C4E2B49001844C2 /* WP_MineVC.swift */; }; + 75B426D62C4E2B9F001844C2 /* colorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426D52C4E2B9F001844C2 /* colorManager.swift */; }; + 75B426D82C4E36D9001844C2 /* my_wallpaper.json in Resources */ = {isa = PBXBuildFile; fileRef = 75B426D72C4E36D9001844C2 /* my_wallpaper.json */; }; + 75B426DB2C4E3705001844C2 /* WP_NewestVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426DA2C4E3705001844C2 /* WP_NewestVC.xib */; }; + 75B426DC2C4E3705001844C2 /* WP_NewestVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426D92C4E3705001844C2 /* WP_NewestVC.swift */; }; + 75B426DF2C4E3711001844C2 /* WP_PopularVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426DE2C4E3711001844C2 /* WP_PopularVC.xib */; }; + 75B426E02C4E3711001844C2 /* WP_PopularVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426DD2C4E3711001844C2 /* WP_PopularVC.swift */; }; + 75B426E32C4E371D001844C2 /* WP_Christmas.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426E22C4E371D001844C2 /* WP_Christmas.xib */; }; + 75B426E42C4E371D001844C2 /* WP_Christmas.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426E12C4E371D001844C2 /* WP_Christmas.swift */; }; + 75B426E72C4E372C001844C2 /* WP_FlowersVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */; }; + 75B426E82C4E372C001844C2 /* WP_FlowersVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */; }; + 75B426EB2C4E38F9001844C2 /* WallpaperModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426EA2C4E38F9001844C2 /* WallpaperModel.swift */; }; + 75B426ED2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */; }; + 75B426F12C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */; }; + 75B426F22C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 75B4269C2C4E092C001844C2 /* WallpaperHD_Live.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WallpaperHD_Live.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 75B4269F2C4E092C001844C2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 75B426A32C4E092C001844C2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 75B426A62C4E092C001844C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 75B426A82C4E092F001844C2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 75B426AB2C4E092F001844C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 75B426AD2C4E092F001844C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 75B426B32C4E0CF5001844C2 /* WP_RootVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RootVC.swift; sourceTree = ""; }; + 75B426B72C4E0D21001844C2 /* WP_RootNAV.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RootNAV.swift; sourceTree = ""; }; + 75B426BA2C4E0FBB001844C2 /* waperLivePCH.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = waperLivePCH.pch; sourceTree = ""; }; + 75B426BB2C4E0FDA001844C2 /* wallpaperLive_Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wallpaperLive_Header.h; sourceTree = ""; }; + 75B426BC2C4E1046001844C2 /* WP_TabButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_TabButton.swift; sourceTree = ""; }; + 75B426BD2C4E1046001844C2 /* WP_TabbarCommon.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_TabbarCommon.swift; sourceTree = ""; }; + 75B426C02C4E10D7001844C2 /* WP_TabBarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_TabBarVC.swift; sourceTree = ""; }; + 75B426C82C4E2B25001844C2 /* WP_HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_HomeVC.swift; sourceTree = ""; }; + 75B426C92C4E2B25001844C2 /* WP_HomeVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_HomeVC.xib; sourceTree = ""; }; + 75B426CC2C4E2B31001844C2 /* WP_RankingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RankingVC.swift; sourceTree = ""; }; + 75B426CD2C4E2B31001844C2 /* WP_RankingVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_RankingVC.xib; sourceTree = ""; }; + 75B426D02C4E2B49001844C2 /* WP_MineVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_MineVC.swift; sourceTree = ""; }; + 75B426D12C4E2B49001844C2 /* WP_MineVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_MineVC.xib; sourceTree = ""; }; + 75B426D52C4E2B9F001844C2 /* colorManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = colorManager.swift; sourceTree = ""; }; + 75B426D72C4E36D9001844C2 /* my_wallpaper.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = my_wallpaper.json; sourceTree = ""; }; + 75B426D92C4E3705001844C2 /* WP_NewestVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_NewestVC.swift; sourceTree = ""; }; + 75B426DA2C4E3705001844C2 /* WP_NewestVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_NewestVC.xib; sourceTree = ""; }; + 75B426DD2C4E3711001844C2 /* WP_PopularVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_PopularVC.swift; sourceTree = ""; }; + 75B426DE2C4E3711001844C2 /* WP_PopularVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_PopularVC.xib; sourceTree = ""; }; + 75B426E12C4E371D001844C2 /* WP_Christmas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_Christmas.swift; sourceTree = ""; }; + 75B426E22C4E371D001844C2 /* WP_Christmas.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_Christmas.xib; sourceTree = ""; }; + 75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_FlowersVC.swift; sourceTree = ""; }; + 75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_FlowersVC.xib; sourceTree = ""; }; + 75B426EA2C4E38F9001844C2 /* WallpaperModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WallpaperModel.swift; sourceTree = ""; }; + 75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewFlowLayout.swift; sourceTree = ""; }; + 75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_WallpaperCollectionCell.swift; sourceTree = ""; }; + 75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_WallpaperCollectionCell.xib; sourceTree = ""; }; + 9CBEA2442AE6AC8044848FC3 /* Pods-WallpaperHD_Live.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WallpaperHD_Live.release.xcconfig"; path = "Target Support Files/Pods-WallpaperHD_Live/Pods-WallpaperHD_Live.release.xcconfig"; sourceTree = ""; }; + A14E883F09B5C78F804A4357 /* Pods-WallpaperHD_Live.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WallpaperHD_Live.debug.xcconfig"; path = "Target Support Files/Pods-WallpaperHD_Live/Pods-WallpaperHD_Live.debug.xcconfig"; sourceTree = ""; }; + F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WallpaperHD_Live.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 75B426992C4E092C001844C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 20E56B217F7725712DE82B32 /* Pods_WallpaperHD_Live.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3B26693A1DA3C12D1BA78081 /* Frameworks */ = { + isa = PBXGroup; + children = ( + F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 5C323131DEFE000D71DE4890 /* Pods */ = { + isa = PBXGroup; + children = ( + A14E883F09B5C78F804A4357 /* Pods-WallpaperHD_Live.debug.xcconfig */, + 9CBEA2442AE6AC8044848FC3 /* Pods-WallpaperHD_Live.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 75B426932C4E092C001844C2 = { + isa = PBXGroup; + children = ( + 75B4269E2C4E092C001844C2 /* WallpaperHD_Live */, + 75B4269D2C4E092C001844C2 /* Products */, + 5C323131DEFE000D71DE4890 /* Pods */, + 3B26693A1DA3C12D1BA78081 /* Frameworks */, + ); + sourceTree = ""; + }; + 75B4269D2C4E092C001844C2 /* Products */ = { + isa = PBXGroup; + children = ( + 75B4269C2C4E092C001844C2 /* WallpaperHD_Live.app */, + ); + name = Products; + sourceTree = ""; + }; + 75B4269E2C4E092C001844C2 /* WallpaperHD_Live */ = { + isa = PBXGroup; + children = ( + 75B426D42C4E2B89001844C2 /* Tool */, + 75B426C62C4E2AF6001844C2 /* Ranking */, + 75B426C42C4E2AEE001844C2 /* Mine */, + 75B426C22C4E2AE4001844C2 /* Home */, + 75B426B92C4E0FA2001844C2 /* Header */, + 75B426B62C4E0D01001844C2 /* Root */, + 75B4269F2C4E092C001844C2 /* AppDelegate.swift */, + 75B426A32C4E092C001844C2 /* ViewController.swift */, + 75B426A52C4E092C001844C2 /* Main.storyboard */, + 75B426A82C4E092F001844C2 /* Assets.xcassets */, + 75B426AA2C4E092F001844C2 /* LaunchScreen.storyboard */, + 75B426AD2C4E092F001844C2 /* Info.plist */, + ); + path = WallpaperHD_Live; + sourceTree = ""; + }; + 75B426B62C4E0D01001844C2 /* Root */ = { + isa = PBXGroup; + children = ( + 75B426BD2C4E1046001844C2 /* WP_TabbarCommon.swift */, + 75B426BC2C4E1046001844C2 /* WP_TabButton.swift */, + 75B426B32C4E0CF5001844C2 /* WP_RootVC.swift */, + 75B426B72C4E0D21001844C2 /* WP_RootNAV.swift */, + 75B426C02C4E10D7001844C2 /* WP_TabBarVC.swift */, + ); + path = Root; + sourceTree = ""; + }; + 75B426B92C4E0FA2001844C2 /* Header */ = { + isa = PBXGroup; + children = ( + 75B426BA2C4E0FBB001844C2 /* waperLivePCH.pch */, + 75B426BB2C4E0FDA001844C2 /* wallpaperLive_Header.h */, + ); + path = Header; + sourceTree = ""; + }; + 75B426C22C4E2AE4001844C2 /* Home */ = { + isa = PBXGroup; + children = ( + 75B426EE2C4E3A12001844C2 /* V */, + 75B426E92C4E38B1001844C2 /* M */, + 75B426C32C4E2AEB001844C2 /* C */, + ); + path = Home; + sourceTree = ""; + }; + 75B426C32C4E2AEB001844C2 /* C */ = { + isa = PBXGroup; + children = ( + 75B426C82C4E2B25001844C2 /* WP_HomeVC.swift */, + 75B426C92C4E2B25001844C2 /* WP_HomeVC.xib */, + 75B426D92C4E3705001844C2 /* WP_NewestVC.swift */, + 75B426DA2C4E3705001844C2 /* WP_NewestVC.xib */, + 75B426DD2C4E3711001844C2 /* WP_PopularVC.swift */, + 75B426DE2C4E3711001844C2 /* WP_PopularVC.xib */, + 75B426E12C4E371D001844C2 /* WP_Christmas.swift */, + 75B426E22C4E371D001844C2 /* WP_Christmas.xib */, + 75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */, + 75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */, + ); + path = C; + sourceTree = ""; + }; + 75B426C42C4E2AEE001844C2 /* Mine */ = { + isa = PBXGroup; + children = ( + 75B426C52C4E2AF3001844C2 /* C */, + ); + path = Mine; + sourceTree = ""; + }; + 75B426C52C4E2AF3001844C2 /* C */ = { + isa = PBXGroup; + children = ( + 75B426D02C4E2B49001844C2 /* WP_MineVC.swift */, + 75B426D12C4E2B49001844C2 /* WP_MineVC.xib */, + ); + path = C; + sourceTree = ""; + }; + 75B426C62C4E2AF6001844C2 /* Ranking */ = { + isa = PBXGroup; + children = ( + 75B426C72C4E2B00001844C2 /* C */, + ); + path = Ranking; + sourceTree = ""; + }; + 75B426C72C4E2B00001844C2 /* C */ = { + isa = PBXGroup; + children = ( + 75B426CC2C4E2B31001844C2 /* WP_RankingVC.swift */, + 75B426CD2C4E2B31001844C2 /* WP_RankingVC.xib */, + ); + path = C; + sourceTree = ""; + }; + 75B426D42C4E2B89001844C2 /* Tool */ = { + isa = PBXGroup; + children = ( + 75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */, + 75B426D72C4E36D9001844C2 /* my_wallpaper.json */, + 75B426D52C4E2B9F001844C2 /* colorManager.swift */, + ); + path = Tool; + sourceTree = ""; + }; + 75B426E92C4E38B1001844C2 /* M */ = { + isa = PBXGroup; + children = ( + 75B426EA2C4E38F9001844C2 /* WallpaperModel.swift */, + ); + path = M; + sourceTree = ""; + }; + 75B426EE2C4E3A12001844C2 /* V */ = { + isa = PBXGroup; + children = ( + 75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */, + 75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */, + ); + path = V; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 75B4269B2C4E092C001844C2 /* WallpaperHD_Live */ = { + isa = PBXNativeTarget; + buildConfigurationList = 75B426B02C4E092F001844C2 /* Build configuration list for PBXNativeTarget "WallpaperHD_Live" */; + buildPhases = ( + 023EE99FFD0E0E6657209E48 /* [CP] Check Pods Manifest.lock */, + 75B426982C4E092C001844C2 /* Sources */, + 75B426992C4E092C001844C2 /* Frameworks */, + 75B4269A2C4E092C001844C2 /* Resources */, + DB736BC1CC064FEBC287AA87 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WallpaperHD_Live; + productName = WallpaperHD_Live; + productReference = 75B4269C2C4E092C001844C2 /* WallpaperHD_Live.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 75B426942C4E092C001844C2 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + CLASSPREFIX = WP_; + LastSwiftUpdateCheck = 1530; + LastUpgradeCheck = 1530; + TargetAttributes = { + 75B4269B2C4E092C001844C2 = { + CreatedOnToolsVersion = 15.3; + }; + }; + }; + buildConfigurationList = 75B426972C4E092C001844C2 /* Build configuration list for PBXProject "WallpaperHD_Live" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 75B426932C4E092C001844C2; + productRefGroup = 75B4269D2C4E092C001844C2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 75B4269B2C4E092C001844C2 /* WallpaperHD_Live */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 75B4269A2C4E092C001844C2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 75B426D82C4E36D9001844C2 /* my_wallpaper.json in Resources */, + 75B426E72C4E372C001844C2 /* WP_FlowersVC.xib in Resources */, + 75B426DF2C4E3711001844C2 /* WP_PopularVC.xib in Resources */, + 75B426D22C4E2B49001844C2 /* WP_MineVC.xib in Resources */, + 75B426E32C4E371D001844C2 /* WP_Christmas.xib in Resources */, + 75B426A92C4E092F001844C2 /* Assets.xcassets in Resources */, + 75B426AC2C4E092F001844C2 /* Base in Resources */, + 75B426CE2C4E2B31001844C2 /* WP_RankingVC.xib in Resources */, + 75B426DB2C4E3705001844C2 /* WP_NewestVC.xib in Resources */, + 75B426F12C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib in Resources */, + 75B426CA2C4E2B25001844C2 /* WP_HomeVC.xib in Resources */, + 75B426A72C4E092C001844C2 /* Base in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 023EE99FFD0E0E6657209E48 /* [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-WallpaperHD_Live-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; + }; + DB736BC1CC064FEBC287AA87 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-WallpaperHD_Live/Pods-WallpaperHD_Live-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-WallpaperHD_Live/Pods-WallpaperHD_Live-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WallpaperHD_Live/Pods-WallpaperHD_Live-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 75B426982C4E092C001844C2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 75B426CF2C4E2B31001844C2 /* WP_RankingVC.swift in Sources */, + 75B426E42C4E371D001844C2 /* WP_Christmas.swift in Sources */, + 75B426DC2C4E3705001844C2 /* WP_NewestVC.swift in Sources */, + 75B426A42C4E092C001844C2 /* ViewController.swift in Sources */, + 75B426B42C4E0CF5001844C2 /* WP_RootVC.swift in Sources */, + 75B426CB2C4E2B25001844C2 /* WP_HomeVC.swift in Sources */, + 75B426B82C4E0D21001844C2 /* WP_RootNAV.swift in Sources */, + 75B426D62C4E2B9F001844C2 /* colorManager.swift in Sources */, + 75B426EB2C4E38F9001844C2 /* WallpaperModel.swift in Sources */, + 75B426ED2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift in Sources */, + 75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */, + 75B426D32C4E2B49001844C2 /* WP_MineVC.swift in Sources */, + 75B426E82C4E372C001844C2 /* WP_FlowersVC.swift in Sources */, + 75B426BF2C4E1046001844C2 /* WP_TabbarCommon.swift in Sources */, + 75B426F22C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift in Sources */, + 75B426E02C4E3711001844C2 /* WP_PopularVC.swift in Sources */, + 75B426C12C4E10D7001844C2 /* WP_TabBarVC.swift in Sources */, + 75B426BE2C4E1046001844C2 /* WP_TabButton.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 75B426A52C4E092C001844C2 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 75B426A62C4E092C001844C2 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 75B426AA2C4E092F001844C2 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 75B426AB2C4E092F001844C2 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 75B426AE2C4E092F001844C2 /* 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 = YES; + 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 = 17.4; + 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; + }; + 75B426AF2C4E092F001844C2 /* 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 = YES; + 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 = 17.4; + 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; + }; + 75B426B12C4E092F001844C2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A14E883F09B5C78F804A4357 /* Pods-WallpaperHD_Live.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6HWQW9JC74; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = WallpaperHD_Live/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.520.cn.WallpaperHD-Live"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/wallpaperLive_Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 75B426B22C4E092F001844C2 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9CBEA2442AE6AC8044848FC3 /* Pods-WallpaperHD_Live.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6HWQW9JC74; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = WallpaperHD_Live/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.520.cn.WallpaperHD-Live"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/wallpaperLive_Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 75B426972C4E092C001844C2 /* Build configuration list for PBXProject "WallpaperHD_Live" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 75B426AE2C4E092F001844C2 /* Debug */, + 75B426AF2C4E092F001844C2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 75B426B02C4E092F001844C2 /* Build configuration list for PBXNativeTarget "WallpaperHD_Live" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 75B426B12C4E092F001844C2 /* Debug */, + 75B426B22C4E092F001844C2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 75B426942C4E092C001844C2 /* Project object */; +} diff --git a/WallpaperHD_Live/AppDelegate.swift b/WallpaperHD_Live/AppDelegate.swift new file mode 100644 index 0000000..d59f280 --- /dev/null +++ b/WallpaperHD_Live/AppDelegate.swift @@ -0,0 +1,26 @@ +// +// AppDelegate.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import IQKeyboardManagerSwift +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + IQKeyboardManager.shared.enable = true + window = UIWindow(frame: UIScreen.main.bounds) + WP_TabbarCommon.TabBarController() + + self.window?.makeKeyAndVisible() + return true + } + + +} + diff --git a/WallpaperHD_Live/Assets.xcassets/AccentColor.colorset/Contents.json b/WallpaperHD_Live/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/AppIcon.appiconset/Contents.json b/WallpaperHD_Live/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/Contents.json b/WallpaperHD_Live/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/home_n.imageset/Contents.json b/WallpaperHD_Live/Assets.xcassets/home_n.imageset/Contents.json new file mode 100644 index 0000000..fd2ab24 --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/home_n.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home (1).png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/home_n.imageset/home (1).png b/WallpaperHD_Live/Assets.xcassets/home_n.imageset/home (1).png new file mode 100644 index 0000000000000000000000000000000000000000..05f47145ff7d239a01923cbc519ac2738d537323 GIT binary patch literal 1963 zcmV;c2UPfpP)Px+Wl2OqRCr$PTYZdNRTV$y&CZgN(hy~7(w0CfQY?nX(4wa6^qo87QY_FQ(tvze zD5y0W6@)^|M~k*vP@13tR6qdox77ZXx*qKO01HoQNdC|6q^3gVeVmW zv%8sj`)1z9bY_=2_pjZ|`S_jRJMWzL?zs=4!)xcxogYZ2)5{&lITrvvJ?cJhjM-Bz zm$xrny7aA1Lc&fuW9G{MU>yK_w1MA00>DNhda6^nI!1uj`VkSiCQ4w4_%qjauZ<$x zs!T@+VCG){z!h=8ipY~nsn5sJNg~^J0<_i-i^znl={U}EMEtD z*REYBl*{F}{lAIG14^l{#0@Trd|L=$=I;T(8b5$?xjcJdVBoc8z=no~W~I~Ve+Q6o zpHk}UQG$vibJPjYT5k}MI|2eYQz^AC3OLX6<{{#r17v?dMBj>HBdW|%B|vMvRzx-i zIA26WBT+$FIc8o607r^s?Lx%wx~{u6j;&_0M~whxz7YVv?{`+IR8%gP<0OC!g#x8g zDKCJ8yIj}3Gl|U!wvL7oX8tMw{4gNxmn)@qwBp0_yo(Sqs72mRMBiz}w$*Jp1GLuH zi^xv`fLuvLPqYef^mechQTAcVziuI-&8_%oi2!E)0s#Cx0KjS@daxB>eqCn%G5|af zkYzV2rS47YD=`71FE&pGIKGL9Ce(tY0BiM_*>-??0&2n+UDy3-5+8{O&{|(CBEM>9 zacUGyqc#fwmnV6Pj7`As@bG7hF*f+)YC(#~7Nyh;Nv=X%9nbUbMZ|9g=v_!e&&RPB zivVWMA>uX>nc;KtBO>}*9LKH7GPCVEw)@mA5pk7L!%^)=CO~WbDG}KQ0DV5=KPDnu zpgO*o*%sO_`5hZ$&dFx8zl#DW5&^|x@m$AoZ18hxjUwVBuIsLf;;3CRO0-N>#@F8FDkGrmWb(n)r{I0crOhm5o`Fa-sPN`<+f0|)vN+n>R=-~4G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>DeH>tTKmo)d# z(!Aph@J|5Dl)mrFz($hN-3bm%8-Jbh=)DsYg;LT4$AVoZlOMJ%Zx=u_GXVhw3h%}+ zaHTP7^RYlGEk^0&z5t@H2AX`6?Wm@)n{8{Q1=B72w0x*x_iusj6(s=CcFJbm*Lfax zQRtn&nFg;U0Vbyg7S*P~Wy^9)Y@4nHu!ex;t;+LQ7l45Y0?d?0*Z7S-c0C|GrqT-F zZ*ei>Vj@Up_-hM`S_#a+b41w33{8alQg5k+w%FtFc2$5O$32q?TRDbwGeO7~gR#C` zRXDKhEo57pDwREdYDFZQUG*l<^DZIa=! zguB0fMqzk)W5!hy6249SlVsq4F{<&|!cf5ZQvo9P4}fNtp&0gJV|GW6zBExJNQD2X zP4Nv$#G6L~1W$a$O-EsJX^Fh-pVqHyvp`xPeE~Wg%l!(NRv>NV^@l)QXHBbUyQSFg z0sS5jRG?Rt*Y5%S9uT8IuS&7s1p7^J{x(7X+`gQFN3=rg!c*Pq9i6;KNSS{NnD^CT z)7q$PE3EOefRoz+qM1`6{(hP<>c;sffDrDDp@o#4x>{V5HE6*gLaY zE&icZ;C7p5yA^O`@2~a+>d{jmj9YY7ML*rC10GuenM{7MZSkW3M4jIYAlhhIlRqk# z_deT5h+YYh$*erlwg=ZTNYN$H*s#*gF5zSaFs7erF$CS0er zx+TspkpMLj9M}Kmx9u-9dMZGQPj3?oaHJA)8^CmDoT`oP_euZ)Zm1Y_b5e|{1n`4q zGx_(h%`3sRGlc%Kchf_N^&q+^zzhG!@i+*3Xo{Y!OcZ{Zl)P{EKSLvohrv`Rm;e9( M07*qoM6N<$f|1F%8UO$Q literal 0 HcmV?d00001 diff --git a/WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/Contents.json b/WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/Contents.json new file mode 100644 index 0000000..907bc13 --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ic_arrow_left.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/ic_arrow_left.png b/WallpaperHD_Live/Assets.xcassets/ic_arrow_left.imageset/ic_arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..1537c423be5f4a659cfd389e3964124158f63135 GIT binary patch literal 466 zcmV;@0WJPgNk&G>0RRA3MM6+kP&iDz0RR9mDZmjB&!eDi8^-)e?+?TL&p*PnZ5y1O zwA<9SZNnf_5AVQ<0RX_2ArJu&1pqS=q~;a^o;e60!~h5(1_Fp+AcP1C7a4^R!3QWF zKyd+r3n4%O03{pdWThD0p8Ep;qHWuzn_JsWZQE9A+qRoJI{)8v@3+4oqW=!uwvD9m zaPNCJY4!`wd;DWgm0`0%k-n%|q(`DNY-Sc}7ibCEpZqj=R{v!&`Ka}%Dq#QQwZfCq zC;K-K#UA)>4P=j(cZJ;fXxZn;a~Un;1PN5r(hiaD23qnq5^SXwwvKCM42qT+`wB}!AH-%RBi5#WVD&LUPOj^k!a*;zTxIwP- zX}OokeGx6|40$Q%OY0bUuc4(Lz|v}@C2hgdYNI8r!_w;JOKZhY1{|G5Xp}bxO*=lb zaGP;XdPaH^=>ti>ap|u}`pcC5+NBjFtx9R7OS^}*BdNOFPKtBV&MEE2!Vd2tPx-!5>BJ`4TvVAv3YinnJ@$ z{F9|l8Bm!{mQl^9jaXu+WHqBqm_e95_PgJ%yhrHEQjwUEv`HZwXb>cc{qvo^L%Tco zeeCY{XWv_y@y_hP%y<6X-@W(TbI&;s;SE0U4L*Np3jkW{Hv_;t0QfL7Pe#O(s{hIY zF!MhVaZmMM0C)lb9wnkzMtgxq4FIk62LV7KVjnXvNHP&b+{DcNz8sf`{*pvS7|)0U zpta5bz*PWnewgx@-+u!DtB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#M0CtK9Ic5qlk2+fa{s!l^$ExE1(A1v7~nY0gA(i@ z;#R4?5|P~J$Hk~z%Ztn9@{?ix!HJ#VaWT^oHX_yz7-8MVg}DC#2LgkAl36#k00000 LNkvXXu0mjfI9og~ literal 0 HcmV?d00001 diff --git a/WallpaperHD_Live/Assets.xcassets/mine_s.imageset/Contents.json b/WallpaperHD_Live/Assets.xcassets/mine_s.imageset/Contents.json new file mode 100644 index 0000000..b1cc4bd --- /dev/null +++ b/WallpaperHD_Live/Assets.xcassets/mine_s.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "mine.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WallpaperHD_Live/Assets.xcassets/mine_s.imageset/mine.png b/WallpaperHD_Live/Assets.xcassets/mine_s.imageset/mine.png new file mode 100644 index 0000000000000000000000000000000000000000..35a912b3be23490c1cf1475dafb6045c54776c9e GIT binary patch literal 2657 zcmV-n3ZC_eP)Px<8%ab#RCr$HTMLYwRTVzx?kru18`Lb7R)_(sb?3i#=w`JKe56=FidriwXb`kM zC=VZ$Xf608Vxek6F;=C@LqQYTSi#m}1$C9+0&QtK_xxiYt2IJF(={5Zbhq36k8?Kv zZ0`P@ng21fLzCWQGRges`Th5C?m1@=PVj*zxc|@+0A|ga_41=fkG=x{-h_zLnRyyB zPe;UQ@&cIoc|?2;5uaz~=Kx@9E|=S~bLY&_H2t}}{(lvIo*5b%dUjx7VA!RfF=NJ* zj*gBq06@TaXZY!^B@+?9X|4T2qaZXq1GLsZ2Y^ee7&2IXt80QFc(_z5J(neG_}_LwGrbgyvCTbWqBc@05K&Z zvq(heWYv=y0Il_l0B~|d@dM0!tMB^)Ow)(wdFLSFjR0_2MEGGMIwgz3OaK^Th?zZC zAtL_JT6VRG>mQYO?~g|meUXS(rd8euz1I3B0Qg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sgVMJR&{s*z}(1a3)E-7aSreq_%_G3_D%n7{rT(#K;OiD3hFx^Q9$3sMFEine4Cih zozGrUKvJMVz$clulJnX3{XrxJ`X(+4h$PT;N=gby3T*xhBvTLxd1$$j0;!b5_HK_y z6h$Mqv*CvaKahwhix0o5zzCwB$OJY<0;eB**nW?sJgu?8SLF#{m}heTJC$a9?C%2v mz{m)Q0!H@1*u$N?0{#M8@!Vf@gQna70000Px%U`a$lRCr$PTCq;VFbs|V10-hZn_xi#2|j=g*kI&0I6ebL*x(}o!3a}*tRTUE zn2U5LmC~M*t6Q$AyS9F@U!K#%4!D6oF!1=D5nu`!I0KdfZ3gFI_GY*9i8Ew5z(zCwmJb7vwz9VchlK>k8ym8vk3rx#xLe}ZKyz<07U$9 z&aD-KJs_gTnBeE%BI3St?xA4&O+@R!yABceuQAfhT>nTSTtRk5n=ur{6% zP-4Iopt+!UEN#hZ<5>!%mI8=427sgK9w95n7J8QG{ThIXexKm?3yYrGv&2vcaCN)L z6bPtHff_mdIZO1OfI8iWo+XkcVD?KE&k{)!5V9{Z0#e@zN;^qYfGI$k0ZDSP!!^Z| z>=&khFK{yRApq=@%3MAUU*>uuqH!@OX~5nP5K`KnmcA!>o?~(Zgf=yjBw*Igx(bkL znkj&YzNz7x8}sMV=X+>ryZ38AmSrEsMy4+`#56T}Pe9WEn%b9BuPL5n|K~R-8AxkG zQ+p$z#6VL*C3{mq*OHS`sB3>r0bMh03W#JtTErwc$=*`HQlR7it|Zy6C&W^qYsO6h zkqk(yxCAHJTMAeTlo&{wlUr$4Dx6clA7BLZi~& +#import + +#endif /* wallpaperLive_Header_h */ diff --git a/WallpaperHD_Live/Header/waperLivePCH.pch b/WallpaperHD_Live/Header/waperLivePCH.pch new file mode 100644 index 0000000..a910b26 --- /dev/null +++ b/WallpaperHD_Live/Header/waperLivePCH.pch @@ -0,0 +1,14 @@ +// +// waperLivePCH.pch +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// +#import "WallpaperHD_Live" +#ifndef waperLivePCH_pch +#define waperLivePCH_pch + +// Include any system framework and library headers here that should be included in all compilation units. +// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. + +#endif /* waperLivePCH_pch */ diff --git a/WallpaperHD_Live/Home/C/WP_Christmas.swift b/WallpaperHD_Live/Home/C/WP_Christmas.swift new file mode 100644 index 0000000..1f4ce70 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_Christmas.swift @@ -0,0 +1,165 @@ +// +// WP_Christmas.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import JXSegmentedView + +import MJRefresh +import SDWebImage + +class WP_Christmas: WP_RootVC { + + @IBOutlet weak var collectionView: UICollectionView! + + + var christmasWallpapers: [WallpaperData] = [] + + + var currentPage: Int = 1 // 当前页数 + let pageSize: Int = 10 // 每页加载的数量 + + // 顶部刷新 + let header = MJRefreshNormalHeader() + // 底部刷新 + let footer = MJRefreshAutoNormalFooter() + override func viewDidLoad() { + super.viewDidLoad() + setCollectionView() + setRefresh() + } + + + @objc func setRefresh(){ + refreshData() + + header.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.setRefresh)) + // 现在的版本要用mj_header + + header.setTitle("pull-to-refresh", for: .idle) + header.setTitle("Release updates", for: .pulling) + header.setTitle("Refreshing...", for: .refreshing) + self.collectionView.mj_header = header + + + // 上拉刷新 + footer.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.loadMoreData)) + footer.setTitle("Pull up loading", for: .idle) + footer.setTitle("Release Load", for: .pulling) + footer.setTitle("Loading...", for: .refreshing) + self.collectionView.mj_footer = footer + + + header.beginRefreshing() + // footer.beginRefreshing() + + + } + // 下拉刷新 + @objc func refreshData() { + currentPage = 1 + settypeNetwork() + } + + // 上拉加载更多 + @objc func loadMoreData() { + currentPage += 1 + settypeNetwork() + } + + func setCollectionView(){ + collectionView.delegate = self + collectionView.dataSource = self + + // 设置 collection view 的布局 + let layout = CustomCollectionViewFlowLayout() + collectionView.collectionViewLayout = layout + layout.scrollDirection = .vertical + + collectionView.register(UINib(nibName: "WP_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "WP_WallpaperCollectionCell") + + } + func settypeNetwork(){ + // 读取 JSON 文件路径 + guard let jsonFilePath = Bundle.main.path(forResource: "my_wallpaper", ofType: "json") else { + fatalError("Unable to locate my_wallpaper.json file.") + } + + // 读取 JSON 数据 + do { + // 读取 JSON 数据 + let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonFilePath)) + + // 尝试将 JSON 数据转换为 Swift 对象 + let decoder = JSONDecoder() + let wallpaperModels = try decoder.decode([WallpaperModel].self, from: jsonData) + + var newwallpaperarr:[WallpaperData] = [] + // 遍历解析后的 WallpaperModel 对象数组 + for wallpaperModel in wallpaperModels { + // 根据名称将数据放入不同的数组中 + switch wallpaperModel.name { + case "Christmas Wallpapers": + newwallpaperarr = wallpaperModel.data + default: + break + } + } + if currentPage == 1 { + // 只取前10条数据 + let firstTenWallpapers = Array(newwallpaperarr.prefix(10)) + self.christmasWallpapers = firstTenWallpapers + collectionView.reloadData() + collectionView.mj_header?.endRefreshing() + } else { + // 上拉加载更多 + let startIndex = currentPage * pageSize + let moreWallpapers = Array(newwallpaperarr.prefix(startIndex)) + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){ + self.christmasWallpapers = moreWallpapers + self.collectionView.reloadData() + self.collectionView.mj_footer?.endRefreshing() + + } + } + + } catch { + print("Error reading or parsing JSON file: \(error)") + } + } +} +extension WP_Christmas:JXSegmentedListContainerViewListDelegate{ + func listView() -> UIView { + return view + } +} +extension WP_Christmas:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + + return self.christmasWallpapers.count + + } + + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell + let model = self.christmasWallpapers[indexPath.row] + if let imageURL = URL(string: model.previewThumb ?? "") { + cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle")) + } + + return cell + + + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + + + + } +} diff --git a/WallpaperHD_Live/Home/C/WP_Christmas.xib b/WallpaperHD_Live/Home/C/WP_Christmas.xib new file mode 100644 index 0000000..df3c118 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_Christmas.xib @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Home/C/WP_FlowersVC.swift b/WallpaperHD_Live/Home/C/WP_FlowersVC.swift new file mode 100644 index 0000000..56c9e6e --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_FlowersVC.swift @@ -0,0 +1,162 @@ +// +// WP_FlowersVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import JXSegmentedView +import MJRefresh +import SDWebImage + +class WP_FlowersVC: WP_RootVC { + + @IBOutlet weak var collectionView: UICollectionView! + var flowersWallpapers: [WallpaperData] = [] + + + var currentPage: Int = 1 // 当前页数 + let pageSize: Int = 10 // 每页加载的数量 + + // 顶部刷新 + let header = MJRefreshNormalHeader() + // 底部刷新 + let footer = MJRefreshAutoNormalFooter() + override func viewDidLoad() { + super.viewDidLoad() + setCollectionView() + setRefresh() + } + + + @objc func setRefresh(){ + refreshData() + + header.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.setRefresh)) + // 现在的版本要用mj_header + + header.setTitle("pull-to-refresh", for: .idle) + header.setTitle("Release updates", for: .pulling) + header.setTitle("Refreshing...", for: .refreshing) + self.collectionView.mj_header = header + + + // 上拉刷新 + footer.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.loadMoreData)) + footer.setTitle("Pull up loading", for: .idle) + footer.setTitle("Release Load", for: .pulling) + footer.setTitle("Loading...", for: .refreshing) + self.collectionView.mj_footer = footer + + + header.beginRefreshing() + // footer.beginRefreshing() + + + } + // 下拉刷新 + @objc func refreshData() { + currentPage = 1 + settypeNetwork() + } + + // 上拉加载更多 + @objc func loadMoreData() { + currentPage += 1 + settypeNetwork() + } + + func setCollectionView(){ + collectionView.delegate = self + collectionView.dataSource = self + + // 设置 collection view 的布局 + let layout = CustomCollectionViewFlowLayout() + collectionView.collectionViewLayout = layout + layout.scrollDirection = .vertical + + collectionView.register(UINib(nibName: "WP_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "WP_WallpaperCollectionCell") + + } + func settypeNetwork(){ + // 读取 JSON 文件路径 + guard let jsonFilePath = Bundle.main.path(forResource: "my_wallpaper", ofType: "json") else { + fatalError("Unable to locate my_wallpaper.json file.") + } + + // 读取 JSON 数据 + do { + // 读取 JSON 数据 + let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonFilePath)) + + // 尝试将 JSON 数据转换为 Swift 对象 + let decoder = JSONDecoder() + let wallpaperModels = try decoder.decode([WallpaperModel].self, from: jsonData) + + var newwallpaperarr:[WallpaperData] = [] + // 遍历解析后的 WallpaperModel 对象数组 + for wallpaperModel in wallpaperModels { + // 根据名称将数据放入不同的数组中 + switch wallpaperModel.name { + case "Flowers": + newwallpaperarr = wallpaperModel.data + default: + break + } + } + if currentPage == 1 { + // 只取前10条数据 + let firstTenWallpapers = Array(newwallpaperarr.prefix(10)) + self.flowersWallpapers = firstTenWallpapers + collectionView.reloadData() + collectionView.mj_header?.endRefreshing() + } else { + // 上拉加载更多 + let startIndex = currentPage * pageSize + let moreWallpapers = Array(newwallpaperarr.prefix(startIndex)) + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){ + self.flowersWallpapers = moreWallpapers + self.collectionView.reloadData() + self.collectionView.mj_footer?.endRefreshing() + + } + } + + } catch { + print("Error reading or parsing JSON file: \(error)") + } + } +} +extension WP_FlowersVC:JXSegmentedListContainerViewListDelegate{ + func listView() -> UIView { + return view + } +} +extension WP_FlowersVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + + return self.flowersWallpapers.count + + } + + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell + let model = self.flowersWallpapers[indexPath.row] + if let imageURL = URL(string: model.previewThumb ?? "") { + cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle")) + } + + return cell + + + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + + + + } +} diff --git a/WallpaperHD_Live/Home/C/WP_FlowersVC.xib b/WallpaperHD_Live/Home/C/WP_FlowersVC.xib new file mode 100644 index 0000000..1946b32 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_FlowersVC.xib @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Home/C/WP_HomeVC.swift b/WallpaperHD_Live/Home/C/WP_HomeVC.swift new file mode 100644 index 0000000..8732d4d --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_HomeVC.swift @@ -0,0 +1,87 @@ +// +// WP_HomeVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import JXSegmentedView + +import SnapKit +class WP_HomeVC: WP_RootVC { + + @IBOutlet weak var segmentedView: JXSegmentedView! + var segmentedDataSource = JXSegmentedTitleDataSource() + var listContainerView: JXSegmentedListContainerView! + override func viewDidLoad() { + super.viewDidLoad() + + setSegmentedViewUI() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.navigationBar.isHidden = true + + + } + func setSegmentedViewUI(){ + segmentedView.delegate = self + //配置数据源相关配置属性 + segmentedDataSource.titles = [ "Flowers","Popular","Christmas","Newest"] + segmentedDataSource.titleSelectedColor = UIColor.black + segmentedDataSource.titleNormalColor = UIColor.gray + segmentedDataSource.titleSelectedFont = .boldSystemFont(ofSize: 20) + segmentedDataSource.titleNormalFont = .systemFont(ofSize: 18) + segmentedDataSource.isTitleColorGradientEnabled = true + self.segmentedDataSource.reloadData(selectedIndex: 0) + //关联dataSource + self.segmentedView.dataSource = segmentedDataSource + + + let indicator = JXSegmentedIndicatorLineView() + indicator.indicatorColor = UIColor.black + self.segmentedView.indicators = [indicator] + + listContainerView = JXSegmentedListContainerView(dataSource: self) + self.view.addSubview(listContainerView) + + segmentedView.listContainer = listContainerView + } + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + + + listContainerView.snp.makeConstraints { make in + make.top.equalTo(segmentedView.snp.bottom).offset(0) + make.width.equalToSuperview() + make.bottom.equalToSuperview() + } + } + +} +extension WP_HomeVC:JXSegmentedListContainerViewDataSource,JXSegmentedViewDelegate { + //返回列表的数量 + func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int { + return 4 + } + //返回遵从`JXSegmentedListContainerViewListDelegate`协议的实例 + func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate { + + if index == 0 { + let vc = WP_FlowersVC() + return vc + }else if index == 1{ + let vc = WP_PopularVC() + return vc + }else if index == 2{ + let vc = WP_Christmas() + return vc + }else{ + let vc = WP_NewestVC() + return vc + } + } + +} diff --git a/WallpaperHD_Live/Home/C/WP_HomeVC.xib b/WallpaperHD_Live/Home/C/WP_HomeVC.xib new file mode 100644 index 0000000..7e20d9b --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_HomeVC.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Home/C/WP_NewestVC.swift b/WallpaperHD_Live/Home/C/WP_NewestVC.swift new file mode 100644 index 0000000..be2c443 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_NewestVC.swift @@ -0,0 +1,163 @@ +// +// WP_NewestVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import JXSegmentedView +import MJRefresh +import SDWebImage + +class WP_NewestVC: WP_RootVC { + @IBOutlet weak var collectionView: UICollectionView! + + var newestWallpapers: [WallpaperData] = [] + + + var currentPage: Int = 1 // 当前页数 + let pageSize: Int = 10 // 每页加载的数量 + + // 顶部刷新 + let header = MJRefreshNormalHeader() + // 底部刷新 + let footer = MJRefreshAutoNormalFooter() + + override func viewDidLoad() { + super.viewDidLoad() + setCollectionView() + setRefresh() + } + + + @objc func setRefresh(){ + refreshData() + + header.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.setRefresh)) + // 现在的版本要用mj_header + + header.setTitle("pull-to-refresh", for: .idle) + header.setTitle("Release updates", for: .pulling) + header.setTitle("Refreshing...", for: .refreshing) + self.collectionView.mj_header = header + + + // 上拉刷新 + footer.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.loadMoreData)) + footer.setTitle("Pull up loading", for: .idle) + footer.setTitle("Release Load", for: .pulling) + footer.setTitle("Loading...", for: .refreshing) + self.collectionView.mj_footer = footer + + + header.beginRefreshing() + // footer.beginRefreshing() + + + } + // 下拉刷新 + @objc func refreshData() { + currentPage = 1 + settypeNetwork() + } + + // 上拉加载更多 + @objc func loadMoreData() { + currentPage += 1 + settypeNetwork() + } + + func setCollectionView(){ + collectionView.delegate = self + collectionView.dataSource = self + + // 设置 collection view 的布局 + let layout = CustomCollectionViewFlowLayout() + collectionView.collectionViewLayout = layout + layout.scrollDirection = .vertical + + collectionView.register(UINib(nibName: "WP_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "WP_WallpaperCollectionCell") + + } + func settypeNetwork(){ + // 读取 JSON 文件路径 + guard let jsonFilePath = Bundle.main.path(forResource: "my_wallpaper", ofType: "json") else { + fatalError("Unable to locate my_wallpaper.json file.") + } + + // 读取 JSON 数据 + do { + // 读取 JSON 数据 + let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonFilePath)) + + // 尝试将 JSON 数据转换为 Swift 对象 + let decoder = JSONDecoder() + let wallpaperModels = try decoder.decode([WallpaperModel].self, from: jsonData) + + var newwallpaperarr:[WallpaperData] = [] + // 遍历解析后的 WallpaperModel 对象数组 + for wallpaperModel in wallpaperModels { + // 根据名称将数据放入不同的数组中 + switch wallpaperModel.name { + case "Newest": + newwallpaperarr = wallpaperModel.data + default: + break + } + } + if currentPage == 1 { + // 只取前10条数据 + let firstTenWallpapers = Array(newwallpaperarr.prefix(10)) + self.newestWallpapers = firstTenWallpapers + collectionView.reloadData() + collectionView.mj_header?.endRefreshing() + } else { + // 上拉加载更多 + let startIndex = currentPage * pageSize + let moreWallpapers = Array(newwallpaperarr.prefix(startIndex)) + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){ + self.newestWallpapers = moreWallpapers + self.collectionView.reloadData() + self.collectionView.mj_footer?.endRefreshing() + + } + } + + } catch { + print("Error reading or parsing JSON file: \(error)") + } + } +} +extension WP_NewestVC:JXSegmentedListContainerViewListDelegate{ + func listView() -> UIView { + return view + } +} +extension WP_NewestVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + + return self.newestWallpapers.count + + } + + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell + let model = self.newestWallpapers[indexPath.row] + if let imageURL = URL(string: model.previewThumb ?? "") { + cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle")) + } + + return cell + + + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + + + + } +} diff --git a/WallpaperHD_Live/Home/C/WP_NewestVC.xib b/WallpaperHD_Live/Home/C/WP_NewestVC.xib new file mode 100644 index 0000000..5d32b92 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_NewestVC.xib @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Home/C/WP_PopularVC.swift b/WallpaperHD_Live/Home/C/WP_PopularVC.swift new file mode 100644 index 0000000..a3e4462 --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_PopularVC.swift @@ -0,0 +1,166 @@ +// +// WP_PopularVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import JXSegmentedView +import MJRefresh +import SDWebImage + + +class WP_PopularVC: WP_RootVC { + @IBOutlet weak var collectionView: UICollectionView! + + + + var populartWallpapers: [WallpaperData] = [] + + + var currentPage: Int = 1 // 当前页数 + let pageSize: Int = 10 // 每页加载的数量 + + // 顶部刷新 + let header = MJRefreshNormalHeader() + // 底部刷新 + let footer = MJRefreshAutoNormalFooter() + + override func viewDidLoad() { + super.viewDidLoad() + setCollectionView() + setRefresh() + } + + + @objc func setRefresh(){ + refreshData() + + header.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.setRefresh)) + // 现在的版本要用mj_header + + header.setTitle("pull-to-refresh", for: .idle) + header.setTitle("Release updates", for: .pulling) + header.setTitle("Refreshing...", for: .refreshing) + self.collectionView.mj_header = header + + + // 上拉刷新 + footer.setRefreshingTarget(self, refreshingAction: #selector(WP_NewestVC.loadMoreData)) + footer.setTitle("Pull up loading", for: .idle) + footer.setTitle("Release Load", for: .pulling) + footer.setTitle("Loading...", for: .refreshing) + self.collectionView.mj_footer = footer + + + header.beginRefreshing() + // footer.beginRefreshing() + + + } + // 下拉刷新 + @objc func refreshData() { + currentPage = 1 + settypeNetwork() + } + + // 上拉加载更多 + @objc func loadMoreData() { + currentPage += 1 + settypeNetwork() + } + + func setCollectionView(){ + collectionView.delegate = self + collectionView.dataSource = self + + // 设置 collection view 的布局 + let layout = CustomCollectionViewFlowLayout() + collectionView.collectionViewLayout = layout + layout.scrollDirection = .vertical + + collectionView.register(UINib(nibName: "WP_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "WP_WallpaperCollectionCell") + + } + func settypeNetwork(){ + // 读取 JSON 文件路径 + guard let jsonFilePath = Bundle.main.path(forResource: "my_wallpaper", ofType: "json") else { + fatalError("Unable to locate my_wallpaper.json file.") + } + + // 读取 JSON 数据 + do { + // 读取 JSON 数据 + let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonFilePath)) + + // 尝试将 JSON 数据转换为 Swift 对象 + let decoder = JSONDecoder() + let wallpaperModels = try decoder.decode([WallpaperModel].self, from: jsonData) + + var newwallpaperarr:[WallpaperData] = [] + // 遍历解析后的 WallpaperModel 对象数组 + for wallpaperModel in wallpaperModels { + // 根据名称将数据放入不同的数组中 + switch wallpaperModel.name { + case "Popular Wallpapers": + newwallpaperarr = wallpaperModel.data + default: + break + } + } + if currentPage == 1 { + // 只取前10条数据 + let firstTenWallpapers = Array(newwallpaperarr.prefix(10)) + self.populartWallpapers = firstTenWallpapers + collectionView.reloadData() + collectionView.mj_header?.endRefreshing() + } else { + // 上拉加载更多 + let startIndex = currentPage * pageSize + let moreWallpapers = Array(newwallpaperarr.prefix(startIndex)) + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){ + self.populartWallpapers = moreWallpapers + self.collectionView.reloadData() + self.collectionView.mj_footer?.endRefreshing() + + } + } + + } catch { + print("Error reading or parsing JSON file: \(error)") + } + } +} +extension WP_PopularVC:JXSegmentedListContainerViewListDelegate{ + func listView() -> UIView { + return view + } +} +extension WP_PopularVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + + return self.populartWallpapers.count + + } + + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell + let model = self.populartWallpapers[indexPath.row] + if let imageURL = URL(string: model.previewThumb ?? "") { + cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle")) + } + + return cell + + + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + + + + } +} diff --git a/WallpaperHD_Live/Home/C/WP_PopularVC.xib b/WallpaperHD_Live/Home/C/WP_PopularVC.xib new file mode 100644 index 0000000..a617e7c --- /dev/null +++ b/WallpaperHD_Live/Home/C/WP_PopularVC.xib @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Home/M/WallpaperModel.swift b/WallpaperHD_Live/Home/M/WallpaperModel.swift new file mode 100644 index 0000000..09a24b2 --- /dev/null +++ b/WallpaperHD_Live/Home/M/WallpaperModel.swift @@ -0,0 +1,41 @@ +// +// WallpaperModel.swift +// wallpaper_project + + +import UIKit +@objcMembers +class WallpaperModel: NSObject,Decodable,Encodable { + var name:String? + let data: [WallpaperData] +} +class WallpaperData: NSObject,Codable { + var original: String? + var previewThumb: String? + var source: String? + var banner:String? + + + enum CodingKeys: String, CodingKey { + case original + case previewThumb + case source + case banner + + } + + // 实现 Decodable 协议中的初始化方法 + required override init() { + super.init() + } + + // 实现 Encodable 协议中的编码方法 + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(original, forKey: .original) + try container.encode(previewThumb, forKey: .previewThumb) + try container.encode(source, forKey: .source) + try container.encode(banner, forKey: .banner) + + } +} diff --git a/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.swift b/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.swift new file mode 100644 index 0000000..2a83971 --- /dev/null +++ b/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.swift @@ -0,0 +1,19 @@ +// +// WP_WallpaperCollectionCell.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit + +class WP_WallpaperCollectionCell: UICollectionViewCell { + + @IBOutlet weak var wpImagV: UIImageView! + override func awakeFromNib() { + super.awakeFromNib() + self.wpImagV.layer.cornerRadius = 10 + self.wpImagV.clipsToBounds = true + } + +} diff --git a/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.xib b/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.xib new file mode 100644 index 0000000..67d9719 --- /dev/null +++ b/WallpaperHD_Live/Home/V/WP_WallpaperCollectionCell.xib @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Info.plist b/WallpaperHD_Live/Info.plist new file mode 100644 index 0000000..6a6654d --- /dev/null +++ b/WallpaperHD_Live/Info.plist @@ -0,0 +1,11 @@ + + + + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/WallpaperHD_Live/Mine/C/WP_MineVC.swift b/WallpaperHD_Live/Mine/C/WP_MineVC.swift new file mode 100644 index 0000000..bc912ad --- /dev/null +++ b/WallpaperHD_Live/Mine/C/WP_MineVC.swift @@ -0,0 +1,18 @@ +// +// WP_MineVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit + +class WP_MineVC: WP_RootVC { + + override func viewDidLoad() { + super.viewDidLoad() + + + } + +} diff --git a/WallpaperHD_Live/Mine/C/WP_MineVC.xib b/WallpaperHD_Live/Mine/C/WP_MineVC.xib new file mode 100644 index 0000000..ec06477 --- /dev/null +++ b/WallpaperHD_Live/Mine/C/WP_MineVC.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Ranking/C/WP_RankingVC.swift b/WallpaperHD_Live/Ranking/C/WP_RankingVC.swift new file mode 100644 index 0000000..980d167 --- /dev/null +++ b/WallpaperHD_Live/Ranking/C/WP_RankingVC.swift @@ -0,0 +1,18 @@ +// +// WP_RankingVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit + +class WP_RankingVC: WP_RootVC { + + override func viewDidLoad() { + super.viewDidLoad() + + + } + +} diff --git a/WallpaperHD_Live/Ranking/C/WP_RankingVC.xib b/WallpaperHD_Live/Ranking/C/WP_RankingVC.xib new file mode 100644 index 0000000..cb752e1 --- /dev/null +++ b/WallpaperHD_Live/Ranking/C/WP_RankingVC.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/WallpaperHD_Live/Root/WP_RootNAV.swift b/WallpaperHD_Live/Root/WP_RootNAV.swift new file mode 100644 index 0000000..e18d762 --- /dev/null +++ b/WallpaperHD_Live/Root/WP_RootNAV.swift @@ -0,0 +1,69 @@ +// +// WP_RootNAV.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit + +class WP_RootNAV: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + + setBackItmer() + } + + func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { + if self.viewControllers.count <= 1 { + let viewController = UIViewController() + viewController.hidesBottomBarWhenPushed = true + tabBarController?.tabBar.isHidden = true + return false + } + setBackItmer() + return true + } + + + override func pushViewController(_ viewController: UIViewController, animated: Bool) { + if viewControllers.count > 0 { +// setBackItmer()/ + viewController.hidesBottomBarWhenPushed = true + tabBarController?.tabBar.isHidden = true + } + setBackItmer() + super.pushViewController(viewController, animated: animated) + + } + func setBackItmer(){ + // 返回按钮 + let backButton = UIButton(type: .custom) + + // 给按钮设置返回箭头图片 + backButton.setBackgroundImage(#imageLiteral(resourceName: "ic_arrow_left"), for: .normal) + + // 设置frame +// backButton.frame = CGRect(x: 200, y: 13, width: 18, height: 18) + backButton.addTarget(self, action: #selector(back), for: .touchUpInside) + +// // 自定义导航栏的UIBarButtonItem类型的按钮 + let backView = UIBarButtonItem(customView: backButton) +// +// // 重要方法,用来调整自定义返回view距离左边的距离 + let barButtonItem = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil) + barButtonItem.width = -5 + + // 返回按钮设置成功 + navigationItem.leftBarButtonItems = [barButtonItem, backView] + + } + // + @objc func back(){ + navigationController?.popViewController(animated: true) + + } + + +} diff --git a/WallpaperHD_Live/Root/WP_RootVC.swift b/WallpaperHD_Live/Root/WP_RootVC.swift new file mode 100644 index 0000000..35c3a37 --- /dev/null +++ b/WallpaperHD_Live/Root/WP_RootVC.swift @@ -0,0 +1,66 @@ +// +// WP_RootVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit + +class WP_RootVC: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + setNavigtionContrilerBase() + + } + //设置导航栏属性 + func setNavigtionContrilerBase(){ + self.navigationController?.navigationBar.barTintColor = .white + let titleTextAttributes = [ + NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16, weight: .bold), + NSAttributedString.Key.foregroundColor: UIColor.black + ] + + ///控制导航栏的背景颜色和底部线的隐藏 + if #available(iOS 13.0, *) { + let appearance = UINavigationBarAppearance() + appearance.configureWithOpaqueBackground() //重置导航栏背景颜色和阴影 + appearance.backgroundColor = UIColor.white + appearance.shadowImage = UIImage() + appearance.shadowColor = nil + appearance.titleTextAttributes = titleTextAttributes + self.navigationController?.navigationBar.standardAppearance = appearance + self.navigationController?.navigationBar.scrollEdgeAppearance = appearance + } else { + + self.navigationController?.navigationBar.barTintColor = UIColor.white + self.navigationController?.navigationBar.titleTextAttributes = titleTextAttributes + self.navigationController?.navigationBar.shadowImage = UIImage() + self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) + } + + } + + + //设置导航栏透明 + func setNavigationCotrollerHide(){ + // 1.设置导航栏半透明 + self.navigationController?.navigationBar.isTranslucent = true + + // 2.设置导航栏背景图片 + self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) + + // 3.设置导航栏阴影图片 + self.navigationController?.navigationBar.shadowImage = UIImage() + } + + + // func setNavigationCotrollerOpaque(){ + // + // } + override var preferredStatusBarStyle : UIStatusBarStyle { + return .lightContent + } + +} diff --git a/WallpaperHD_Live/Root/WP_TabBarVC.swift b/WallpaperHD_Live/Root/WP_TabBarVC.swift new file mode 100644 index 0000000..5c73e78 --- /dev/null +++ b/WallpaperHD_Live/Root/WP_TabBarVC.swift @@ -0,0 +1,18 @@ +// +// WP_TabBarVC.swift +// WallpaperHD_Live +// +// Created by 忆海16 on 2024/7/22. +// + +import UIKit +import CYLTabBarController +class WP_TabBarVC: CYLTabBarController { + + override func viewDidLoad() { + super.viewDidLoad() + + + } + +} diff --git a/WallpaperHD_Live/Root/WP_TabButton.swift b/WallpaperHD_Live/Root/WP_TabButton.swift new file mode 100644 index 0000000..d8beba5 --- /dev/null +++ b/WallpaperHD_Live/Root/WP_TabButton.swift @@ -0,0 +1,89 @@ +// +// WP_TabButton.swift +// WallpaperHD_Live + + +import UIKit +import CYLTabBarController + +class WP_TabButton: CYLPlusButton,CYLPlusButtonSubclassing { + + static func plusButton() -> Any { + let button = WP_TabButton() + + button.setBackgroundImage(UIImage(named: "icon_add"), for: .normal) +// button.sizeThatFits(CGSize(width: 40, height: 40)) + button.bounds = CGRect(x: 0, y: 0, width: 30, height: 30) + button.titleLabel?.textAlignment = .center + + button.titleLabel?.font = UIFont.systemFont(ofSize: 15) + + button.adjustsImageWhenHighlighted = false + button.addTarget(button, action: #selector(clickbtn), for: .touchUpInside) + button.sizeToFit() + + return button + } + + + @objc func clickbtn(){ + let tabBarController = WP_TabButton.cyl_tabBarController() + let viewController = tabBarController.selectedViewController + + let vc = WP_HomeVC() + vc.modalPresentationStyle = .custom + viewController?.present(vc, animated: true, completion: nil) + } + override func sizeThatFits(_ size: CGSize) -> CGSize { + return CGSize(width: 30, height: 30) + } + + /// MARK: 插入位置 + static func indexOfPlusButtonInTabBar() -> UInt { + return 1 + } + + static func multiplier(ofTabBarHeight tabBarHeight: CGFloat) -> CGFloat { + return 0.7 + } + + + static func constantOfPlusButtonCenterYOffset(forTabBarHeight tabBarHeight: CGFloat) -> CGFloat { + let screenHeight = UIScreen.main.nativeBounds.size.height; + if screenHeight == 2436 || screenHeight == 1792 || screenHeight == 2688 || screenHeight == 1624 { + return -40 + } + return -30 + } + + static func shouldSelectPlusChildViewController() -> Bool { + return true + } + + override func layoutSubviews() { + super.layoutSubviews() + + // tabbar UI layout setup +// let imageViewEdgeWidth:CGFloat = self.bounds.size.width * 0.5 + let imageViewEdgeWidth:CGFloat = 40 +// let imageViewEdgeHeight:CGFloat = imageViewEdgeWidth * 0.5 + let imageViewEdgeHeight:CGFloat = 40 + let centerOfView = self.bounds.size.width * 0.5 + let labelLineHeight = self.titleLabel!.font.lineHeight + let verticalMargin = (self.bounds.size.height - labelLineHeight - imageViewEdgeHeight ) * 0.5 + + let centerOfImageView = verticalMargin + imageViewEdgeHeight * 0.5 + let centerOfTitleLabel = imageViewEdgeHeight + verticalMargin * 2 + labelLineHeight * 0.5 + 10 + + //imageView position layout + self.imageView!.bounds = CGRect(x:0, y:0, width:30, height:30) + self.imageView!.center = CGPoint(x:centerOfView, y:centerOfImageView) + + //title position layout + self.titleLabel!.bounds = CGRect(x:0, y:0, width:self.bounds.size.width,height:labelLineHeight) + self.titleLabel!.center = CGPoint(x:centerOfView, y:centerOfTitleLabel) + + } + + +} diff --git a/WallpaperHD_Live/Root/WP_TabbarCommon.swift b/WallpaperHD_Live/Root/WP_TabbarCommon.swift new file mode 100644 index 0000000..cf009e0 --- /dev/null +++ b/WallpaperHD_Live/Root/WP_TabbarCommon.swift @@ -0,0 +1,97 @@ +// +// WP_TabbarCommon.swift +// WallpaperHD_Live + + +import UIKit +import CYLTabBarController + +class WP_TabbarCommon: NSObject { + /// MARK: 切换跳转主界面 + class func tabBarSelectIndex(_ selectIndex: Int) { +// WP_TabButton.register() + let tabBarController = WP_TabBarVC(viewControllers: viewControllers(), tabBarItemsAttributes: tabBarItemsAttributesForController()) + + + tabBarController.selectedIndex = selectIndex; + let appDelegate = UIApplication.shared.delegate + appDelegate?.window??.rootViewController = tabBarController + } + + /// MARK: 切换跳转主界面 操作其他事件 + class func completionhandler(_ selectIndex: Int, _: () ->()) { + tabBarSelectIndex(selectIndex) + } + + /// MARK: 进入APP + class func enterApp(_ : () -> ()) { + TabBarController() + } + + /// MARK: 创建根视图 + class func TabBarController() { +// WP_TabButton.register() + let appDelegate = UIApplication.shared.delegate + appDelegate?.window??.rootViewController = WP_TabBarVC(viewControllers: viewControllers(), tabBarItemsAttributes: tabBarItemsAttributesForController()) + let tabBarController = WP_TabBarVC() + tabBarController.cyl_tabBarController.tabBar.backgroundColor = .white + tabBarController.tabBar.shadowImage = UIImage() + tabBarController.tabBar.backgroundImage = UIImage() + } + + + class func viewControllers() -> [WP_RootNAV]{ + + //首页 + let home = WP_RootNAV(rootViewController: WP_HomeVC()) + home.tabBarItem.imageInsets = UIEdgeInsets.init(top: 20, left: 0, bottom: 20, right: 0) + + home.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#2c2c2c", alpha: 1)], for: .selected) + + let rank = WP_RootNAV(rootViewController: WP_RankingVC()) + rank.tabBarItem.imageInsets = UIEdgeInsets.init(top: 20, left: 0, bottom: 20, right: 0) + + rank.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#2c2c2c", alpha: 1)], for: .selected) + + + + let mine = WP_RootNAV(rootViewController: WP_MineVC()) + mine.tabBarItem.imageInsets = UIEdgeInsets.init(top: 20, left: 0, bottom: 20, right: 0) + mine.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#2c2c2c", alpha: 1)], for: .selected) + + + let viewControllers = [home,rank,mine] + + + + + return viewControllers + + } + + class func tabBarItemsAttributesForController() -> [[String : String]] { + + + let tabBarItemOne = [CYLTabBarItemTitle:"Home", + CYLTabBarItemImage:"home_n", + CYLTabBarItemSelectedImage:"home_s"] + + let tabBarItemrank = [CYLTabBarItemTitle:"Ranking", + CYLTabBarItemImage:"rank_n", + CYLTabBarItemSelectedImage:"rank_s"] + + + + let tabBarItemtwo = [CYLTabBarItemTitle:"Setting", + CYLTabBarItemImage:"mine_n", + CYLTabBarItemSelectedImage:"mine_s"] + + + let tabBarItemsAttributes = [tabBarItemOne,tabBarItemrank,tabBarItemtwo] +// + + return tabBarItemsAttributes + } + + +} diff --git a/WallpaperHD_Live/Tool/CustomCollectionViewFlowLayout.swift b/WallpaperHD_Live/Tool/CustomCollectionViewFlowLayout.swift new file mode 100644 index 0000000..4008c71 --- /dev/null +++ b/WallpaperHD_Live/Tool/CustomCollectionViewFlowLayout.swift @@ -0,0 +1,23 @@ +// +// CustomCollectionViewFlowLayout.swift +// wallpaper_project + + +import UIKit + +class CustomCollectionViewFlowLayout: UICollectionViewFlowLayout { + override func prepare() { + super.prepare() + + guard let collectionView = collectionView else { return } + +// let availableWidth = collectionView.bounds.width - sectionInset.left - sectionInset.right - minimumInteritemSpacing + + let itemWidth = (collectionView.bounds.width - minimumInteritemSpacing * 3) / 2 + + itemSize = CGSize(width: itemWidth, height: 300) // 设置每个单元格的大小 + minimumLineSpacing = 10 // 设置行间距 + minimumInteritemSpacing = 10 // 设置列间距 + sectionInset = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10) + } +} diff --git a/WallpaperHD_Live/Tool/colorManager.swift b/WallpaperHD_Live/Tool/colorManager.swift new file mode 100644 index 0000000..036b5ab --- /dev/null +++ b/WallpaperHD_Live/Tool/colorManager.swift @@ -0,0 +1,59 @@ +// +// colorManager.swift +// wallpaper_project + +import UIKit +import Foundation + +var screenWidth = UIScreen.main.bounds.size.width +var screenHeight = UIScreen.main.bounds.size.height + +extension UIColor{ + + ///转hex值 + /// + class func hexSting(color:String,alpha:CGFloat)->UIColor{ + //删除字符串中的kongge + var cString:String = color.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased() + if cString.count < 6{ + return UIColor.white + } + if cString.hasPrefix("OX") { + let temstr:NSString = cString as NSString + cString = temstr.substring(from: 2)as String + } + if cString.hasPrefix("#") { + let temstr:NSString = cString as NSString + cString = temstr.substring(from: 1) as String + } + if cString.count != 6{ + return UIColor.white + } + var range:NSRange = NSMakeRange(0, 2) + let temstr2:NSString = cString as NSString + let rString = temstr2.substring(with: range)as String + range = NSMakeRange(2, 2) + let gString = temstr2.substring(with: range)as String + range = NSMakeRange(4, 2) + let bString = temstr2.substring(with: range)as String + var r:UInt32 = 0,g:UInt32 = 0,b:UInt32 = 0 + Scanner(string: rString).scanHexInt32(&r) + Scanner(string: gString).scanHexInt32(&g) + Scanner(string: bString).scanHexInt32(&b) + + return self.init(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: alpha) + } + class func colorWithHexString(color:String)->UIColor{ + return hexSting(color: color, alpha: 1.0) + } +} +func generateRandomString(length: Int) -> String { + let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + var randomString = "" + for _ in 0..