This commit is contained in:
忆海16 2024-07-22 15:18:42 +08:00
commit e83f58454f
49 changed files with 14346 additions and 0 deletions

22
Podfile Normal file
View File

@ -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

View File

@ -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 = "<group>"; };
75B426A32C4E092C001844C2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
75B426A62C4E092C001844C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
75B426A82C4E092F001844C2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
75B426AB2C4E092F001844C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
75B426AD2C4E092F001844C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
75B426B32C4E0CF5001844C2 /* WP_RootVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RootVC.swift; sourceTree = "<group>"; };
75B426B72C4E0D21001844C2 /* WP_RootNAV.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RootNAV.swift; sourceTree = "<group>"; };
75B426BA2C4E0FBB001844C2 /* waperLivePCH.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = waperLivePCH.pch; sourceTree = "<group>"; };
75B426BB2C4E0FDA001844C2 /* wallpaperLive_Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wallpaperLive_Header.h; sourceTree = "<group>"; };
75B426BC2C4E1046001844C2 /* WP_TabButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_TabButton.swift; sourceTree = "<group>"; };
75B426BD2C4E1046001844C2 /* WP_TabbarCommon.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_TabbarCommon.swift; sourceTree = "<group>"; };
75B426C02C4E10D7001844C2 /* WP_TabBarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_TabBarVC.swift; sourceTree = "<group>"; };
75B426C82C4E2B25001844C2 /* WP_HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_HomeVC.swift; sourceTree = "<group>"; };
75B426C92C4E2B25001844C2 /* WP_HomeVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_HomeVC.xib; sourceTree = "<group>"; };
75B426CC2C4E2B31001844C2 /* WP_RankingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RankingVC.swift; sourceTree = "<group>"; };
75B426CD2C4E2B31001844C2 /* WP_RankingVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_RankingVC.xib; sourceTree = "<group>"; };
75B426D02C4E2B49001844C2 /* WP_MineVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_MineVC.swift; sourceTree = "<group>"; };
75B426D12C4E2B49001844C2 /* WP_MineVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_MineVC.xib; sourceTree = "<group>"; };
75B426D52C4E2B9F001844C2 /* colorManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = colorManager.swift; sourceTree = "<group>"; };
75B426D72C4E36D9001844C2 /* my_wallpaper.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = my_wallpaper.json; sourceTree = "<group>"; };
75B426D92C4E3705001844C2 /* WP_NewestVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_NewestVC.swift; sourceTree = "<group>"; };
75B426DA2C4E3705001844C2 /* WP_NewestVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_NewestVC.xib; sourceTree = "<group>"; };
75B426DD2C4E3711001844C2 /* WP_PopularVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_PopularVC.swift; sourceTree = "<group>"; };
75B426DE2C4E3711001844C2 /* WP_PopularVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_PopularVC.xib; sourceTree = "<group>"; };
75B426E12C4E371D001844C2 /* WP_Christmas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_Christmas.swift; sourceTree = "<group>"; };
75B426E22C4E371D001844C2 /* WP_Christmas.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_Christmas.xib; sourceTree = "<group>"; };
75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_FlowersVC.swift; sourceTree = "<group>"; };
75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_FlowersVC.xib; sourceTree = "<group>"; };
75B426EA2C4E38F9001844C2 /* WallpaperModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WallpaperModel.swift; sourceTree = "<group>"; };
75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewFlowLayout.swift; sourceTree = "<group>"; };
75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_WallpaperCollectionCell.swift; sourceTree = "<group>"; };
75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_WallpaperCollectionCell.xib; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
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 = "<group>";
};
5C323131DEFE000D71DE4890 /* Pods */ = {
isa = PBXGroup;
children = (
A14E883F09B5C78F804A4357 /* Pods-WallpaperHD_Live.debug.xcconfig */,
9CBEA2442AE6AC8044848FC3 /* Pods-WallpaperHD_Live.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
75B426932C4E092C001844C2 = {
isa = PBXGroup;
children = (
75B4269E2C4E092C001844C2 /* WallpaperHD_Live */,
75B4269D2C4E092C001844C2 /* Products */,
5C323131DEFE000D71DE4890 /* Pods */,
3B26693A1DA3C12D1BA78081 /* Frameworks */,
);
sourceTree = "<group>";
};
75B4269D2C4E092C001844C2 /* Products */ = {
isa = PBXGroup;
children = (
75B4269C2C4E092C001844C2 /* WallpaperHD_Live.app */,
);
name = Products;
sourceTree = "<group>";
};
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 = "<group>";
};
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 = "<group>";
};
75B426B92C4E0FA2001844C2 /* Header */ = {
isa = PBXGroup;
children = (
75B426BA2C4E0FBB001844C2 /* waperLivePCH.pch */,
75B426BB2C4E0FDA001844C2 /* wallpaperLive_Header.h */,
);
path = Header;
sourceTree = "<group>";
};
75B426C22C4E2AE4001844C2 /* Home */ = {
isa = PBXGroup;
children = (
75B426EE2C4E3A12001844C2 /* V */,
75B426E92C4E38B1001844C2 /* M */,
75B426C32C4E2AEB001844C2 /* C */,
);
path = Home;
sourceTree = "<group>";
};
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 = "<group>";
};
75B426C42C4E2AEE001844C2 /* Mine */ = {
isa = PBXGroup;
children = (
75B426C52C4E2AF3001844C2 /* C */,
);
path = Mine;
sourceTree = "<group>";
};
75B426C52C4E2AF3001844C2 /* C */ = {
isa = PBXGroup;
children = (
75B426D02C4E2B49001844C2 /* WP_MineVC.swift */,
75B426D12C4E2B49001844C2 /* WP_MineVC.xib */,
);
path = C;
sourceTree = "<group>";
};
75B426C62C4E2AF6001844C2 /* Ranking */ = {
isa = PBXGroup;
children = (
75B426C72C4E2B00001844C2 /* C */,
);
path = Ranking;
sourceTree = "<group>";
};
75B426C72C4E2B00001844C2 /* C */ = {
isa = PBXGroup;
children = (
75B426CC2C4E2B31001844C2 /* WP_RankingVC.swift */,
75B426CD2C4E2B31001844C2 /* WP_RankingVC.xib */,
);
path = C;
sourceTree = "<group>";
};
75B426D42C4E2B89001844C2 /* Tool */ = {
isa = PBXGroup;
children = (
75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */,
75B426D72C4E36D9001844C2 /* my_wallpaper.json */,
75B426D52C4E2B9F001844C2 /* colorManager.swift */,
);
path = Tool;
sourceTree = "<group>";
};
75B426E92C4E38B1001844C2 /* M */ = {
isa = PBXGroup;
children = (
75B426EA2C4E38F9001844C2 /* WallpaperModel.swift */,
);
path = M;
sourceTree = "<group>";
};
75B426EE2C4E3A12001844C2 /* V */ = {
isa = PBXGroup;
children = (
75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */,
75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */,
);
path = V;
sourceTree = "<group>";
};
/* 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 = "<group>";
};
75B426AA2C4E092F001844C2 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
75B426AB2C4E092F001844C2 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* 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 */;
}

View File

@ -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
}
}

View File

@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

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

View File

@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

View File

@ -0,0 +1,14 @@
//
// wallpaperLive_Header.h
// WallpaperHD_Live
//
// Created by 忆海16 on 2024/7/22.
//
#ifndef wallpaperLive_Header_h
#define wallpaperLive_Header_h
#import "CYLTabBarController.h"
#import <MJExtension.h>
#import <MJRefresh.h>
#endif /* wallpaperLive_Header_h */

View File

@ -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 */

View File

@ -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) {
}
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_Christmas" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="1TM-l4-eqh" id="eU2-p5-GeY"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="1TM-l4-eqh">
<rect key="frame" x="0.0" y="69" width="393" height="749"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="kAc-9N-Jl3">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="1TM-l4-eqh" secondAttribute="trailing" id="9Yc-4l-nos"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="1TM-l4-eqh" secondAttribute="bottom" id="AHP-GH-VT1"/>
<constraint firstItem="1TM-l4-eqh" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="H3x-DR-khD"/>
<constraint firstItem="1TM-l4-eqh" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="dNK-tW-b0z"/>
</constraints>
<point key="canvasLocation" x="129" y="-11"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -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) {
}
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_FlowersVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="dzA-dd-YYe" id="nIk-uU-4OV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="dzA-dd-YYe">
<rect key="frame" x="0.0" y="69" width="393" height="749"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="vR7-n5-Wyd">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="dzA-dd-YYe" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="0Ku-z3-9Ko"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="dzA-dd-YYe" secondAttribute="trailing" id="Hhy-If-gna"/>
<constraint firstItem="dzA-dd-YYe" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="J6r-rA-Op4"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="dzA-dd-YYe" secondAttribute="bottom" id="SIS-6w-WwZ"/>
</constraints>
<point key="canvasLocation" x="129" y="-11"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -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
}
}
}

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_HomeVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="segmentedView" destination="j5O-9J-UYV" id="1Lj-VV-Dqk"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5O-9J-UYV" customClass="JXSegmentedView" customModule="JXSegmentedView">
<rect key="frame" x="0.0" y="59" width="393" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="pvV-t9-Vwc"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="j5O-9J-UYV" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="Jw3-0t-8IA"/>
<constraint firstItem="j5O-9J-UYV" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="hd3-TZ-w2r"/>
<constraint firstItem="j5O-9J-UYV" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="jRB-m0-PdN"/>
</constraints>
<point key="canvasLocation" x="129" y="-11"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -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) {
}
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_NewestVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="oFm-1O-vwo" id="ec2-qn-YnU"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="oFm-1O-vwo">
<rect key="frame" x="0.0" y="69" width="393" height="749"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="oxK-Li-6jK">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="oFm-1O-vwo" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="DV8-eK-ePf"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="oFm-1O-vwo" secondAttribute="bottom" id="LRJ-4W-aF7"/>
<constraint firstItem="oFm-1O-vwo" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="W6U-KG-632"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="oFm-1O-vwo" secondAttribute="trailing" id="Yai-Dd-VnJ"/>
</constraints>
<point key="canvasLocation" x="129" y="-11"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -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) {
}
}

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_PopularVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="QWB-Q0-grt" id="cnV-z4-3rw"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="QWB-Q0-grt">
<rect key="frame" x="0.0" y="69" width="393" height="749"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="D4M-nn-dmC">
<size key="itemSize" width="128" height="128"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="QWB-Q0-grt" secondAttribute="trailing" id="SAy-1s-8eq"/>
<constraint firstItem="QWB-Q0-grt" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="kri-m0-gz9"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="QWB-Q0-grt" secondAttribute="bottom" id="lSh-hw-bk9"/>
<constraint firstItem="QWB-Q0-grt" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="y3h-17-sqn"/>
</constraints>
<point key="canvasLocation" x="129" y="-11"/>
</view>
</objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -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)
}
}

View File

@ -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
}
}

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="WP_WallpaperCollectionCell" customModule="WallpaperHD_Live" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Vyl-QE-58R">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
</imageView>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Vyl-QE-58R" secondAttribute="trailing" id="9Tu-h6-atU"/>
<constraint firstAttribute="bottom" secondItem="Vyl-QE-58R" secondAttribute="bottom" id="BKq-Ij-aMq"/>
<constraint firstItem="Vyl-QE-58R" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="DXc-en-ym6"/>
<constraint firstItem="Vyl-QE-58R" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="XUx-Ed-d3A"/>
</constraints>
<connections>
<outlet property="wpImagV" destination="Vyl-QE-58R" id="gfy-eX-A11"/>
</connections>
<point key="canvasLocation" x="128" y="-11"/>
</collectionViewCell>
</objects>
</document>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>

View File

@ -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()
}
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_MineVC" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
</view>
</objects>
</document>

View File

@ -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()
}
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_RankingVC" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
</view>
</objects>
</document>

View File

@ -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)
}
}

View File

@ -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
}
}

View File

@ -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()
}
}

View File

@ -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)
}
}

View File

@ -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
}
}

View File

@ -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)
}
}

View File

@ -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..<length {
let randomIndex = Int.random(in: 0..<letters.count)
let randomLetter = letters[letters.index(letters.startIndex, offsetBy: randomIndex)]
randomString += String(randomLetter)
}
return randomString
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
//
// ViewController.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}