相册添加,设备锁

This commit is contained in:
忆海16 2024-07-23 11:43:02 +08:00
parent a8b7a3f2cf
commit 71eec03d0e
47 changed files with 2635 additions and 21 deletions

View File

@ -8,6 +8,8 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
20E56B217F7725712DE82B32 /* Pods_WallpaperHD_Live.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */; }; 20E56B217F7725712DE82B32 /* Pods_WallpaperHD_Live.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */; };
753B78932C4F427E0007526F /* WP_PhotoAlbumVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 753B78912C4F427E0007526F /* WP_PhotoAlbumVC.swift */; };
753B78942C4F427E0007526F /* WP_PhotoAlbumVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 753B78922C4F427E0007526F /* WP_PhotoAlbumVC.xib */; };
75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4269F2C4E092C001844C2 /* AppDelegate.swift */; }; 75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4269F2C4E092C001844C2 /* AppDelegate.swift */; };
75B426A42C4E092C001844C2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426A32C4E092C001844C2 /* ViewController.swift */; }; 75B426A42C4E092C001844C2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426A32C4E092C001844C2 /* ViewController.swift */; };
75B426A72C4E092C001844C2 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75B426A62C4E092C001844C2 /* Base */; }; 75B426A72C4E092C001844C2 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 75B426A62C4E092C001844C2 /* Base */; };
@ -42,9 +44,28 @@
75B426FC2C4E45EB001844C2 /* WP_4KModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426FB2C4E45EB001844C2 /* WP_4KModel.swift */; }; 75B426FC2C4E45EB001844C2 /* WP_4KModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426FB2C4E45EB001844C2 /* WP_4KModel.swift */; };
75B426FF2C4E4990001844C2 /* WP_RankingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426FE2C4E4990001844C2 /* WP_RankingCell.xib */; }; 75B426FF2C4E4990001844C2 /* WP_RankingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B426FE2C4E4990001844C2 /* WP_RankingCell.xib */; };
75B427002C4E4990001844C2 /* WP_RankingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426FD2C4E4990001844C2 /* WP_RankingCell.swift */; }; 75B427002C4E4990001844C2 /* WP_RankingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B426FD2C4E4990001844C2 /* WP_RankingCell.swift */; };
75B427032C4E63A8001844C2 /* WP_WallPaPerDetailsVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B427022C4E63A8001844C2 /* WP_WallPaPerDetailsVC.xib */; };
75B427042C4E63A8001844C2 /* WP_WallPaPerDetailsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427012C4E63A8001844C2 /* WP_WallPaPerDetailsVC.swift */; };
75B427062C4E658E001844C2 /* historyManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427052C4E658D001844C2 /* historyManager.swift */; };
75B427082C4E65A3001844C2 /* AccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427072C4E65A3001844C2 /* AccountManager.swift */; };
75B4270A2C4E65E3001844C2 /* PrefixHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427092C4E65E3001844C2 /* PrefixHeader.swift */; };
75B4270D2C4E66CB001844C2 /* WA_PreView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B4270B2C4E66CA001844C2 /* WA_PreView.xib */; };
75B4270E2C4E66CB001844C2 /* WA_PreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4270C2C4E66CA001844C2 /* WA_PreView.swift */; };
75B427112C4E6BF2001844C2 /* WP_AboutVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B427102C4E6BF2001844C2 /* WP_AboutVC.xib */; };
75B427122C4E6BF2001844C2 /* WP_AboutVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4270F2C4E6BF2001844C2 /* WP_AboutVC.swift */; };
75B427142C4E6CEF001844C2 /* WP_PrivacyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427132C4E6CEF001844C2 /* WP_PrivacyVC.swift */; };
75B4271B2C4E76B4001844C2 /* WP_FeedVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B4271A2C4E76B4001844C2 /* WP_FeedVC.xib */; };
75B4271C2C4E76B4001844C2 /* WP_FeedVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427192C4E76B4001844C2 /* WP_FeedVC.swift */; };
75B4271F2C4E7A84001844C2 /* WP_CollectionVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B4271E2C4E7A84001844C2 /* WP_CollectionVC.xib */; };
75B427202C4E7A84001844C2 /* WP_CollectionVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B4271D2C4E7A84001844C2 /* WP_CollectionVC.swift */; };
75B427222C4E80CB001844C2 /* SPayPassWordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427212C4E80CB001844C2 /* SPayPassWordView.swift */; };
75B427252C4E811E001844C2 /* WP_LockVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75B427242C4E811E001844C2 /* WP_LockVC.xib */; };
75B427262C4E811E001844C2 /* WP_LockVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B427232C4E811E001844C2 /* WP_LockVC.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
753B78912C4F427E0007526F /* WP_PhotoAlbumVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_PhotoAlbumVC.swift; sourceTree = "<group>"; };
753B78922C4F427E0007526F /* WP_PhotoAlbumVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_PhotoAlbumVC.xib; sourceTree = "<group>"; };
75B4269C2C4E092C001844C2 /* WallpaperHD_Live.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WallpaperHD_Live.app; sourceTree = BUILT_PRODUCTS_DIR; }; 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>"; }; 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>"; }; 75B426A32C4E092C001844C2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@ -83,6 +104,23 @@
75B426FB2C4E45EB001844C2 /* WP_4KModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_4KModel.swift; sourceTree = "<group>"; }; 75B426FB2C4E45EB001844C2 /* WP_4KModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WP_4KModel.swift; sourceTree = "<group>"; };
75B426FD2C4E4990001844C2 /* WP_RankingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RankingCell.swift; sourceTree = "<group>"; }; 75B426FD2C4E4990001844C2 /* WP_RankingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_RankingCell.swift; sourceTree = "<group>"; };
75B426FE2C4E4990001844C2 /* WP_RankingCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_RankingCell.xib; sourceTree = "<group>"; }; 75B426FE2C4E4990001844C2 /* WP_RankingCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_RankingCell.xib; sourceTree = "<group>"; };
75B427012C4E63A8001844C2 /* WP_WallPaPerDetailsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_WallPaPerDetailsVC.swift; sourceTree = "<group>"; };
75B427022C4E63A8001844C2 /* WP_WallPaPerDetailsVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_WallPaPerDetailsVC.xib; sourceTree = "<group>"; };
75B427052C4E658D001844C2 /* historyManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = historyManager.swift; sourceTree = "<group>"; };
75B427072C4E65A3001844C2 /* AccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountManager.swift; sourceTree = "<group>"; };
75B427092C4E65E3001844C2 /* PrefixHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrefixHeader.swift; sourceTree = "<group>"; };
75B4270B2C4E66CA001844C2 /* WA_PreView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WA_PreView.xib; sourceTree = "<group>"; };
75B4270C2C4E66CA001844C2 /* WA_PreView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WA_PreView.swift; sourceTree = "<group>"; };
75B4270F2C4E6BF2001844C2 /* WP_AboutVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_AboutVC.swift; sourceTree = "<group>"; };
75B427102C4E6BF2001844C2 /* WP_AboutVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_AboutVC.xib; sourceTree = "<group>"; };
75B427132C4E6CEF001844C2 /* WP_PrivacyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_PrivacyVC.swift; sourceTree = "<group>"; };
75B427192C4E76B4001844C2 /* WP_FeedVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_FeedVC.swift; sourceTree = "<group>"; };
75B4271A2C4E76B4001844C2 /* WP_FeedVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_FeedVC.xib; sourceTree = "<group>"; };
75B4271D2C4E7A84001844C2 /* WP_CollectionVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_CollectionVC.swift; sourceTree = "<group>"; };
75B4271E2C4E7A84001844C2 /* WP_CollectionVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_CollectionVC.xib; sourceTree = "<group>"; };
75B427212C4E80CB001844C2 /* SPayPassWordView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SPayPassWordView.swift; sourceTree = "<group>"; };
75B427232C4E811E001844C2 /* WP_LockVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WP_LockVC.swift; sourceTree = "<group>"; };
75B427242C4E811E001844C2 /* WP_LockVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WP_LockVC.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>"; }; 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>"; }; 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; }; F59CBF68E08818FF22B15165 /* Pods_WallpaperHD_Live.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WallpaperHD_Live.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -198,6 +236,8 @@
75B426E22C4E371D001844C2 /* WP_Christmas.xib */, 75B426E22C4E371D001844C2 /* WP_Christmas.xib */,
75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */, 75B426E52C4E372C001844C2 /* WP_FlowersVC.swift */,
75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */, 75B426E62C4E372C001844C2 /* WP_FlowersVC.xib */,
75B427012C4E63A8001844C2 /* WP_WallPaPerDetailsVC.swift */,
75B427022C4E63A8001844C2 /* WP_WallPaPerDetailsVC.xib */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
@ -215,6 +255,17 @@
children = ( children = (
75B426D02C4E2B49001844C2 /* WP_MineVC.swift */, 75B426D02C4E2B49001844C2 /* WP_MineVC.swift */,
75B426D12C4E2B49001844C2 /* WP_MineVC.xib */, 75B426D12C4E2B49001844C2 /* WP_MineVC.xib */,
75B4270F2C4E6BF2001844C2 /* WP_AboutVC.swift */,
75B427102C4E6BF2001844C2 /* WP_AboutVC.xib */,
75B427132C4E6CEF001844C2 /* WP_PrivacyVC.swift */,
75B427192C4E76B4001844C2 /* WP_FeedVC.swift */,
75B4271A2C4E76B4001844C2 /* WP_FeedVC.xib */,
75B4271D2C4E7A84001844C2 /* WP_CollectionVC.swift */,
75B4271E2C4E7A84001844C2 /* WP_CollectionVC.xib */,
75B427232C4E811E001844C2 /* WP_LockVC.swift */,
75B427242C4E811E001844C2 /* WP_LockVC.xib */,
753B78912C4F427E0007526F /* WP_PhotoAlbumVC.swift */,
753B78922C4F427E0007526F /* WP_PhotoAlbumVC.xib */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
@ -241,6 +292,10 @@
75B426D42C4E2B89001844C2 /* Tool */ = { 75B426D42C4E2B89001844C2 /* Tool */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
75B427212C4E80CB001844C2 /* SPayPassWordView.swift */,
75B427092C4E65E3001844C2 /* PrefixHeader.swift */,
75B427072C4E65A3001844C2 /* AccountManager.swift */,
75B427052C4E658D001844C2 /* historyManager.swift */,
75B426F82C4E457D001844C2 /* 4k.json */, 75B426F82C4E457D001844C2 /* 4k.json */,
75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */, 75B426EC2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift */,
75B426D72C4E36D9001844C2 /* my_wallpaper.json */, 75B426D72C4E36D9001844C2 /* my_wallpaper.json */,
@ -260,6 +315,8 @@
75B426EE2C4E3A12001844C2 /* V */ = { 75B426EE2C4E3A12001844C2 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
75B4270C2C4E66CA001844C2 /* WA_PreView.swift */,
75B4270B2C4E66CA001844C2 /* WA_PreView.xib */,
75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */, 75B426EF2C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift */,
75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */, 75B426F02C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib */,
); );
@ -345,6 +402,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
75B426F92C4E457D001844C2 /* 4k.json in Resources */, 75B426F92C4E457D001844C2 /* 4k.json in Resources */,
75B4271B2C4E76B4001844C2 /* WP_FeedVC.xib in Resources */,
75B426FF2C4E4990001844C2 /* WP_RankingCell.xib in Resources */, 75B426FF2C4E4990001844C2 /* WP_RankingCell.xib in Resources */,
75B426D82C4E36D9001844C2 /* my_wallpaper.json in Resources */, 75B426D82C4E36D9001844C2 /* my_wallpaper.json in Resources */,
75B426E72C4E372C001844C2 /* WP_FlowersVC.xib in Resources */, 75B426E72C4E372C001844C2 /* WP_FlowersVC.xib in Resources */,
@ -352,11 +410,17 @@
75B426D22C4E2B49001844C2 /* WP_MineVC.xib in Resources */, 75B426D22C4E2B49001844C2 /* WP_MineVC.xib in Resources */,
75B426E32C4E371D001844C2 /* WP_Christmas.xib in Resources */, 75B426E32C4E371D001844C2 /* WP_Christmas.xib in Resources */,
75B426A92C4E092F001844C2 /* Assets.xcassets in Resources */, 75B426A92C4E092F001844C2 /* Assets.xcassets in Resources */,
75B4270D2C4E66CB001844C2 /* WA_PreView.xib in Resources */,
75B4271F2C4E7A84001844C2 /* WP_CollectionVC.xib in Resources */,
75B426AC2C4E092F001844C2 /* Base in Resources */, 75B426AC2C4E092F001844C2 /* Base in Resources */,
75B426CE2C4E2B31001844C2 /* WP_RankingVC.xib in Resources */, 75B426CE2C4E2B31001844C2 /* WP_RankingVC.xib in Resources */,
75B426DB2C4E3705001844C2 /* WP_NewestVC.xib in Resources */, 75B426DB2C4E3705001844C2 /* WP_NewestVC.xib in Resources */,
75B427032C4E63A8001844C2 /* WP_WallPaPerDetailsVC.xib in Resources */,
75B426F12C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib in Resources */, 75B426F12C4E3A3C001844C2 /* WP_WallpaperCollectionCell.xib in Resources */,
75B426CA2C4E2B25001844C2 /* WP_HomeVC.xib in Resources */, 75B426CA2C4E2B25001844C2 /* WP_HomeVC.xib in Resources */,
75B427112C4E6BF2001844C2 /* WP_AboutVC.xib in Resources */,
753B78942C4F427E0007526F /* WP_PhotoAlbumVC.xib in Resources */,
75B427252C4E811E001844C2 /* WP_LockVC.xib in Resources */,
75B426A72C4E092C001844C2 /* Base in Resources */, 75B426A72C4E092C001844C2 /* Base in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -412,23 +476,35 @@
files = ( files = (
75B426CF2C4E2B31001844C2 /* WP_RankingVC.swift in Sources */, 75B426CF2C4E2B31001844C2 /* WP_RankingVC.swift in Sources */,
75B426E42C4E371D001844C2 /* WP_Christmas.swift in Sources */, 75B426E42C4E371D001844C2 /* WP_Christmas.swift in Sources */,
75B427062C4E658E001844C2 /* historyManager.swift in Sources */,
75B427082C4E65A3001844C2 /* AccountManager.swift in Sources */,
75B426FC2C4E45EB001844C2 /* WP_4KModel.swift in Sources */, 75B426FC2C4E45EB001844C2 /* WP_4KModel.swift in Sources */,
75B426DC2C4E3705001844C2 /* WP_NewestVC.swift in Sources */, 75B426DC2C4E3705001844C2 /* WP_NewestVC.swift in Sources */,
75B426A42C4E092C001844C2 /* ViewController.swift in Sources */, 75B426A42C4E092C001844C2 /* ViewController.swift in Sources */,
75B426B42C4E0CF5001844C2 /* WP_RootVC.swift in Sources */, 75B426B42C4E0CF5001844C2 /* WP_RootVC.swift in Sources */,
75B426CB2C4E2B25001844C2 /* WP_HomeVC.swift in Sources */, 75B426CB2C4E2B25001844C2 /* WP_HomeVC.swift in Sources */,
75B427122C4E6BF2001844C2 /* WP_AboutVC.swift in Sources */,
753B78932C4F427E0007526F /* WP_PhotoAlbumVC.swift in Sources */,
75B4270E2C4E66CB001844C2 /* WA_PreView.swift in Sources */,
75B426B82C4E0D21001844C2 /* WP_RootNAV.swift in Sources */, 75B426B82C4E0D21001844C2 /* WP_RootNAV.swift in Sources */,
75B426D62C4E2B9F001844C2 /* colorManager.swift in Sources */, 75B426D62C4E2B9F001844C2 /* colorManager.swift in Sources */,
75B426EB2C4E38F9001844C2 /* WallpaperModel.swift in Sources */, 75B426EB2C4E38F9001844C2 /* WallpaperModel.swift in Sources */,
75B4270A2C4E65E3001844C2 /* PrefixHeader.swift in Sources */,
75B427202C4E7A84001844C2 /* WP_CollectionVC.swift in Sources */,
75B426ED2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift in Sources */, 75B426ED2C4E3A02001844C2 /* CustomCollectionViewFlowLayout.swift in Sources */,
75B427002C4E4990001844C2 /* WP_RankingCell.swift in Sources */, 75B427002C4E4990001844C2 /* WP_RankingCell.swift in Sources */,
75B4271C2C4E76B4001844C2 /* WP_FeedVC.swift in Sources */,
75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */, 75B426A02C4E092C001844C2 /* AppDelegate.swift in Sources */,
75B427222C4E80CB001844C2 /* SPayPassWordView.swift in Sources */,
75B427042C4E63A8001844C2 /* WP_WallPaPerDetailsVC.swift in Sources */,
75B426D32C4E2B49001844C2 /* WP_MineVC.swift in Sources */, 75B426D32C4E2B49001844C2 /* WP_MineVC.swift in Sources */,
75B426E82C4E372C001844C2 /* WP_FlowersVC.swift in Sources */, 75B426E82C4E372C001844C2 /* WP_FlowersVC.swift in Sources */,
75B426BF2C4E1046001844C2 /* WP_TabbarCommon.swift in Sources */, 75B426BF2C4E1046001844C2 /* WP_TabbarCommon.swift in Sources */,
75B427262C4E811E001844C2 /* WP_LockVC.swift in Sources */,
75B426F22C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift in Sources */, 75B426F22C4E3A3C001844C2 /* WP_WallpaperCollectionCell.swift in Sources */,
75B426E02C4E3711001844C2 /* WP_PopularVC.swift in Sources */, 75B426E02C4E3711001844C2 /* WP_PopularVC.swift in Sources */,
75B426C12C4E10D7001844C2 /* WP_TabBarVC.swift in Sources */, 75B426C12C4E10D7001844C2 /* WP_TabBarVC.swift in Sources */,
75B427142C4E6CEF001844C2 /* WP_PrivacyVC.swift in Sources */,
75B426BE2C4E1046001844C2 /* WP_TabButton.swift in Sources */, 75B426BE2C4E1046001844C2 /* WP_TabButton.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -587,6 +663,7 @@
GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = WallpaperHD_Live/Info.plist; INFOPLIST_FILE = WallpaperHD_Live/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Lock Wallpaper";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIMainStoryboardFile = Main;
@ -624,6 +701,7 @@
GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/WallpaperHD_Live/Header/waperLivePCH.pch";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = WallpaperHD_Live/Info.plist; INFOPLIST_FILE = WallpaperHD_Live/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Lock Wallpaper";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIMainStoryboardFile = Main;

View File

@ -11,16 +11,32 @@ import IQKeyboardManagerSwift
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var window: UIWindow?
let hasLaunchedBeforeKey = "hasLaunchedBefore"
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
window = UIWindow(frame: UIScreen.main.bounds) window = UIWindow(frame: UIScreen.main.bounds)
WP_TabbarCommon.TabBarController() // WP_TabbarCommon.TabBarController()
let userDefaults = UserDefaults.standard
if userDefaults.bool(forKey: hasLaunchedBeforeKey){
if userDefaults.bool(forKey: "islock"){
let vc = WP_LockVC()
self.window?.rootViewController = WP_RootNAV(rootViewController: vc)
}else{
WP_TabbarCommon.TabBarController()
}
}else{
//
userDefaults.set(true, forKey: hasLaunchedBeforeKey)
userDefaults.set(false, forKey: "islock")
WP_TabbarCommon.TabBarController()
}
self.window?.makeKeyAndVisible() self.window?.makeKeyAndVisible()
return true return true
} }
} }

View File

@ -1,6 +1,7 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "logo.png",
"idiom" : "universal", "idiom" : "universal",
"platform" : "ios", "platform" : "ios",
"size" : "1024x1024" "size" : "1024x1024"

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 KiB

View File

@ -1,7 +1,7 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "截屏2024-03-11 16.39.35.png", "filename" : "Rectangle.jpeg",
"idiom" : "universal", "idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "照相机.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.1 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "手电筒.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: 451 B

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Image.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: 97 KiB

View File

@ -158,7 +158,10 @@ extension WP_Christmas:UICollectionViewDelegate,UICollectionViewDataSource,UICol
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let vc = WP_WallPaPerDetailsVC()
vc.type = 2
vc.modeltype = self.christmasWallpapers[indexPath.row]
self.navigationController?.pushViewController(vc, animated: true)
} }

View File

@ -156,7 +156,10 @@ extension WP_FlowersVC:UICollectionViewDelegate,UICollectionViewDataSource,UICol
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let vc = WP_WallPaPerDetailsVC()
vc.type = 2
vc.modeltype = self.flowersWallpapers[indexPath.row]
self.navigationController?.pushViewController(vc, animated: true)
} }
} }

View File

@ -157,7 +157,10 @@ extension WP_NewestVC:UICollectionViewDelegate,UICollectionViewDataSource,UIColl
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let vc = WP_WallPaPerDetailsVC()
vc.type = 2
vc.modeltype = self.newestWallpapers[indexPath.row]
self.navigationController?.pushViewController(vc, animated: true)
} }
} }

View File

@ -159,7 +159,10 @@ extension WP_PopularVC:UICollectionViewDelegate,UICollectionViewDataSource,UICol
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let vc = WP_WallPaPerDetailsVC()
vc.type = 2
vc.modeltype = self.populartWallpapers[indexPath.row]
self.navigationController?.pushViewController(vc, animated: true)
} }

View File

@ -0,0 +1,288 @@
//
// WP_WallPaPerDetailsVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
import SDWebImage
import Photos
import SVProgressHUD
import Alamofire
class WP_WallPaPerDetailsVC: WP_RootVC {
@IBOutlet weak var bgView: UIView!
@IBOutlet weak var backBtn: UIButton!
@IBOutlet weak var preimageV: UIImageView!
var model = WP_4KModel()
var modeltype = WallpaperData()
let activityView = UIActivityIndicatorView()
var type:Int = 0
override func viewDidLoad() {
super.viewDidLoad()
if type == 1{
let imageURL = URL(string: model.preview ?? "")
preimageV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
}else{
let imageURL = URL(string: modeltype.source ?? "")
preimageV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
}
// UIView
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(viewTapped))
preimageV.isUserInteractionEnabled = true
preimageV.addGestureRecognizer(tapGesture)
activityView.center = CGPoint(x: self.view.center.x, y: self.view.center.y - kSafeArea_Top - 44)
//
activityView.hidesWhenStopped = true
activityView.color = .black;
activityView.style = UIActivityIndicatorView.Style.whiteLarge
self.view.addSubview(activityView)
backBtn.layer.cornerRadius = 20
if type == 1{
let model1 = WP_4KModel()
model1.preview = self.model.preview
model1.title = self.model.title
model1.thumbnail = self.model.thumbnail
model1.is_free = self.model.is_free
model1.category = self.model.category
model1.id = self.model.id
model1.cnt_like = self.model.cnt_like
HistoryManager.shared.addHistoryItem(item: model1)
}else{
let model1 = WallpaperData()
model1.original = self.modeltype.original
model1.previewThumb = self.modeltype.previewThumb
model1.source = self.modeltype.source
model1.banner = self.modeltype.banner
HistoryjpgManager.shared.addHistoryItem(item: model1)
}
}
@IBAction func saveBtn(_ sender: Any) {
self.activityView.startAnimating()
saveImageToPhotoLibrary()
DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0){
self.activityView.stopAnimating()
// self.view.makeToast("Save Success", duration: 1.5, position: .center)
// UIAlertController
let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
//
alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
//
alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
//
// print("")
// let vc = WA_TipVC()
// self.present(vc, animated: true)
}))
// present
self.present(alertController, animated: true, completion: nil)
}
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isHidden = true
}
func saveImageToPhotoLibrary() {
guard let image = self.preimageV.image else {
print("找不到要保存的图片")
SVProgressHUD.showInfo(withStatus: "Can't find the picture to save")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
return
}
PHPhotoLibrary.requestAuthorization { status in
switch status {
case .authorized:
self.saveImage(image: image)
case .denied, .restricted:
print("用户拒绝了访问相册权限")
SVProgressHUD.showInfo(withStatus: "Album access denied")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
case .notDetermined:
print("用户尚未选择是否允许访问相册")
SVProgressHUD.showInfo(withStatus: "You have not chosen whether to allow access to the album")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
@unknown default:
break
}
}
}
func saveImage(image: UIImage) {
PHPhotoLibrary.shared().performChanges({
//
PHAssetChangeRequest.creationRequestForAsset(from: image)
}) { success, error in
if success {
print("图片保存成功")
} else if let error = error {
print("图片保存失败:\(error.localizedDescription)")
SVProgressHUD.showError(withStatus: "Image saving failed:\(error.localizedDescription)")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
}
}
}
@IBAction func previewBtn(_ sender: Any) {
UIView.animate(withDuration: 0.5, animations: {
self.bgView.frame.origin.y += 0
self.bgView.alpha = 0
self.backBtn.isHidden = true
})
showView()
}
//
@objc func viewTapped() {
// UIView
if bgView.frame.origin.y == UIScreen.main.bounds.height - bgView.frame.height {
// UIView
UIView.animate(withDuration: 0.5, animations: {
self.bgView.frame.origin.y += self.bgView.frame.height
self.bgView.alpha = 0
self.backBtn.isHidden = true
})
} else {
self.backBtn.isHidden = false
// UIView
UIView.animate(withDuration: 0.5, animations: {
self.bgView.frame.origin.y -= self.bgView.frame.height
self.bgView.alpha = 1
})
}
}
func showView() {
//
let previewView = Bundle.main.loadNibNamed("WA_PreView", owner: nil, options: nil)?.first as! WA_PreView
previewView.flashView.layer.cornerRadius = 25
previewView.cameraV.layer.cornerRadius = 25
previewView.touchBlock = {
self.backBtn.isHidden = false
// UIView
UIView.animate(withDuration: 0.5, animations: {
self.bgView.frame.origin.y -= 0
self.bgView.alpha = 1
})
}
view.addSubview(previewView)
//
previewView.frame.origin.x = -previewView.frame.width
//
UIView.animate(withDuration: 1.0) {
//
previewView.frame = self.view.frame
}
}
@IBAction func shareBtn(_ sender: Any) {
self.activityView.startAnimating()
//
guard let image = self.preimageV.image else {
SVProgressHUD.showInfo(withStatus: "Can't find the image to share")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
print("找不到要分享的图片")
return
}
//
let items: [Any] = [image]
// UIActivityViewController
let activityViewController = UIActivityViewController(activityItems: items, applicationActivities: nil)
// UIActivityViewController
activityViewController.modalPresentationStyle = .popover
// iPad UIActivityViewController
if let popoverController = activityViewController.popoverPresentationController {
popoverController.sourceView = self.view
popoverController.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0)
popoverController.permittedArrowDirections = []
}
//
self.present(activityViewController, animated: true, completion: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 0){
self.activityView.stopAnimating()
}
}
@IBAction func collectBtn(_ sender: Any) {
if type == 1{
let model1 = WP_4KModel()
model1.preview = self.model.preview
model1.title = self.model.title
model1.thumbnail = self.model.thumbnail
model1.is_free = self.model.is_free
model1.category = self.model.category
model1.id = self.model.id
model1.cnt_like = self.model.cnt_like
sc4kManager.shared.addHistoryItem(item: model1)
}else{
let model1 = WallpaperData()
model1.original = self.modeltype.original
model1.previewThumb = self.modeltype.previewThumb
model1.source = self.modeltype.source
model1.banner = self.modeltype.banner
scjpgManager.shared.addHistoryItem(item: model1)
}
SVProgressHUD.showInfo(withStatus: "Collection successful")
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
SVProgressHUD.dismiss()
}
}
@IBAction func back(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}
}

View File

@ -0,0 +1,137 @@
<?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_WallPaPerDetailsVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="backBtn" destination="DrH-XT-Uwh" id="IIc-bl-BMD"/>
<outlet property="bgView" destination="gTa-mI-r0w" id="EaL-Q8-NVh"/>
<outlet property="preimageV" destination="Bwq-sX-kaQ" id="Rhm-ny-l7a"/>
<outlet property="view" destination="Vff-q9-Onk" id="pMo-PL-kXb"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Vff-q9-Onk">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Bwq-sX-kaQ">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gTa-mI-r0w">
<rect key="frame" x="0.0" y="772" width="393" height="80"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tgr-cS-F42">
<rect key="frame" x="0.0" y="0.0" width="98.333333333333329" height="80"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="save">
<color key="titleColor" systemColor="labelColor"/>
</state>
<connections>
<action selector="saveBtn:" destination="-1" eventType="touchUpInside" id="fzF-jV-eWo"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xFN-QF-fay">
<rect key="frame" x="98.333333333333343" y="0.0" width="98.333333333333343" height="80"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Preview">
<color key="titleColor" systemColor="labelColor"/>
</state>
<connections>
<action selector="previewBtn:" destination="-1" eventType="touchUpInside" id="Hw3-9z-uQe"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dDb-Hf-402">
<rect key="frame" x="196.66666666666666" y="0.0" width="97.999999999999972" height="80"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="share">
<color key="titleColor" systemColor="labelColor"/>
</state>
<connections>
<action selector="shareBtn:" destination="-1" eventType="touchUpInside" id="f1V-3P-Pab"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sMJ-JN-f7L">
<rect key="frame" x="294.66666666666669" y="0.0" width="98.333333333333314" height="80"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="collect">
<color key="titleColor" systemColor="labelColor"/>
</state>
<connections>
<action selector="collectBtn:" destination="-1" eventType="touchUpInside" id="kb9-gX-1BG"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="dDb-Hf-402" secondAttribute="bottom" id="0PE-me-ck7"/>
<constraint firstItem="tgr-cS-F42" firstAttribute="leading" secondItem="gTa-mI-r0w" secondAttribute="leading" id="66u-0e-Qfz"/>
<constraint firstItem="dDb-Hf-402" firstAttribute="width" secondItem="gTa-mI-r0w" secondAttribute="width" multiplier="1:4" id="ARs-dJ-Jc2"/>
<constraint firstItem="tgr-cS-F42" firstAttribute="top" secondItem="gTa-mI-r0w" secondAttribute="top" id="C6g-XO-Dsy"/>
<constraint firstItem="xFN-QF-fay" firstAttribute="leading" secondItem="tgr-cS-F42" secondAttribute="trailing" id="CFs-Uv-xKN"/>
<constraint firstItem="sMJ-JN-f7L" firstAttribute="leading" secondItem="dDb-Hf-402" secondAttribute="trailing" id="INC-de-TTn"/>
<constraint firstAttribute="bottom" secondItem="tgr-cS-F42" secondAttribute="bottom" id="JWZ-25-bE0"/>
<constraint firstAttribute="bottom" secondItem="xFN-QF-fay" secondAttribute="bottom" id="Jzp-ae-PwS"/>
<constraint firstItem="xFN-QF-fay" firstAttribute="width" secondItem="gTa-mI-r0w" secondAttribute="width" multiplier="1:4" id="LgW-gp-pic"/>
<constraint firstItem="dDb-Hf-402" firstAttribute="leading" secondItem="xFN-QF-fay" secondAttribute="trailing" id="NET-nB-P91"/>
<constraint firstItem="xFN-QF-fay" firstAttribute="top" secondItem="gTa-mI-r0w" secondAttribute="top" id="R0U-Fk-DDm"/>
<constraint firstItem="tgr-cS-F42" firstAttribute="width" secondItem="gTa-mI-r0w" secondAttribute="width" multiplier="1:4" id="dKu-Hs-q3P"/>
<constraint firstItem="dDb-Hf-402" firstAttribute="top" secondItem="gTa-mI-r0w" secondAttribute="top" id="emv-br-Rx8"/>
<constraint firstAttribute="bottom" secondItem="sMJ-JN-f7L" secondAttribute="bottom" id="hDq-VD-LAm"/>
<constraint firstAttribute="height" constant="80" id="ivp-GN-wtd"/>
<constraint firstAttribute="trailing" secondItem="sMJ-JN-f7L" secondAttribute="trailing" id="miN-nd-gIG"/>
<constraint firstItem="sMJ-JN-f7L" firstAttribute="top" secondItem="gTa-mI-r0w" secondAttribute="top" id="mnA-ke-lqm"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DrH-XT-Uwh">
<rect key="frame" x="20" y="79" width="40" height="40"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="NV7-4y-7TF"/>
<constraint firstAttribute="width" constant="40" id="REK-Ez-IL6"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="9hR-ku-Wf2"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="5DC-u0-ILk"/>
<color key="backgroundColor" red="0.90087980030000003" green="0.99662238359999999" blue="0.97967141869999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="5DC-u0-ILk" firstAttribute="trailing" secondItem="gTa-mI-r0w" secondAttribute="trailing" id="2TG-Vr-Xmx"/>
<constraint firstItem="Bwq-sX-kaQ" firstAttribute="top" secondItem="Vff-q9-Onk" secondAttribute="top" id="Aig-Jd-Alx"/>
<constraint firstItem="Bwq-sX-kaQ" firstAttribute="leading" secondItem="5DC-u0-ILk" secondAttribute="leading" id="HVt-ot-QrF"/>
<constraint firstItem="DrH-XT-Uwh" firstAttribute="top" secondItem="5DC-u0-ILk" secondAttribute="top" constant="20" id="HWi-4K-4sR"/>
<constraint firstAttribute="bottom" secondItem="Bwq-sX-kaQ" secondAttribute="bottom" id="ZD6-tA-3WN"/>
<constraint firstAttribute="bottom" secondItem="gTa-mI-r0w" secondAttribute="bottom" id="jwP-8A-5j3"/>
<constraint firstItem="5DC-u0-ILk" firstAttribute="trailing" secondItem="Bwq-sX-kaQ" secondAttribute="trailing" id="sKY-zU-bZ4"/>
<constraint firstItem="gTa-mI-r0w" firstAttribute="leading" secondItem="5DC-u0-ILk" secondAttribute="leading" id="wac-3H-jfM"/>
<constraint firstItem="DrH-XT-Uwh" firstAttribute="leading" secondItem="5DC-u0-ILk" secondAttribute="leading" constant="20" id="xE8-dk-Qnd"/>
</constraints>
<point key="canvasLocation" x="113.04347826086958" y="-11.383928571428571"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,65 @@
//
// WA_PreView.swift
// wallpaper_project
import UIKit
class WA_PreView: UIView {
@IBOutlet weak var flashView: UIView!
@IBOutlet weak var cameraV: UIView!
var touchBlock:(()->())?
override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
private func commonInit() {
guard let view = loadViewFromNib() else { return }
view.frame = bounds
addSubview(view)
seeUI()
}
private func loadViewFromNib() -> UIView? {
let nib = UINib(nibName: "WA_PreView", bundle: nil)
return nib.instantiate(withOwner: self, options: nil).first as? UIView
}
private func seeUI() {
self.flashView.layer.cornerRadius = 25
self.flashView.clipsToBounds = true
self.cameraV.layer.cornerRadius = 25
self.cameraV.clipsToBounds = true
}
@IBAction func hidView(_ sender: UIButton) {
UIView.animate(withDuration: 1.0, animations: {
self.frame.origin.x = -self.frame.width
}) { (finished) in
//
self.removeFromSuperview()
}
if self.touchBlock != nil{
self.touchBlock!()
}
}
}

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="WA_PreView" customModule="wallpaper_project" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="9:56" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V2o-Zk-KzH">
<rect key="frame" x="131" y="68" width="152.5" height="84"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="70"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bLN-cP-2sK">
<rect key="frame" x="40" y="792" width="50" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="flashlight" translatesAutoresizingMaskIntoConstraints="NO" id="iTX-YT-JsN">
<rect key="frame" x="10" y="10" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="P3d-Sm-hyZ"/>
<constraint firstAttribute="height" constant="30" id="ZKa-Dl-Akq"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="FJl-52-yMQ"/>
<constraint firstItem="iTX-YT-JsN" firstAttribute="centerX" secondItem="bLN-cP-2sK" secondAttribute="centerX" id="OHt-Oe-5oF"/>
<constraint firstAttribute="width" constant="50" id="d34-aF-0gj"/>
<constraint firstItem="iTX-YT-JsN" firstAttribute="centerY" secondItem="bLN-cP-2sK" secondAttribute="centerY" id="pHt-VK-w9O"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NJA-rF-sMi">
<rect key="frame" x="324" y="792" width="50" height="50"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="camera" translatesAutoresizingMaskIntoConstraints="NO" id="OZV-d6-bX8">
<rect key="frame" x="10" y="10" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="4ME-gA-iZJ"/>
<constraint firstAttribute="height" constant="30" id="ca0-TY-d9B"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="OZV-d6-bX8" firstAttribute="centerY" secondItem="NJA-rF-sMi" secondAttribute="centerY" id="39Y-jB-UbK"/>
<constraint firstAttribute="width" constant="50" id="MQS-vg-2zn"/>
<constraint firstItem="OZV-d6-bX8" firstAttribute="centerX" secondItem="NJA-rF-sMi" secondAttribute="centerX" id="PJw-Lc-2bF"/>
<constraint firstAttribute="height" constant="50" id="t2q-Lc-wBh"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3月12 星期二" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M0r-Rm-mO7">
<rect key="frame" x="148" y="152" width="118.5" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="emz-Mb-zjY">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="hidView:" destination="iN0-l3-epB" eventType="touchUpInside" id="sXi-jf-vC9"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="emz-Mb-zjY" secondAttribute="bottom" id="17t-Ad-6QE"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="bLN-cP-2sK" secondAttribute="bottom" constant="20" id="4bb-8o-DEn"/>
<constraint firstItem="V2o-Zk-KzH" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="6p5-qv-Hkb"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="NJA-rF-sMi" secondAttribute="bottom" constant="20" id="DTz-qo-a90"/>
<constraint firstItem="emz-Mb-zjY" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="UGX-KQ-wuT"/>
<constraint firstItem="bLN-cP-2sK" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="40" id="XFW-vO-JDL"/>
<constraint firstItem="emz-Mb-zjY" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Yer-46-PIe"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="emz-Mb-zjY" secondAttribute="trailing" id="Ykk-Yl-Tkk"/>
<constraint firstItem="V2o-Zk-KzH" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="20" id="jHj-OW-z5J"/>
<constraint firstItem="M0r-Rm-mO7" firstAttribute="top" secondItem="V2o-Zk-KzH" secondAttribute="bottom" id="lJt-4o-NzU"/>
<constraint firstItem="M0r-Rm-mO7" firstAttribute="centerX" secondItem="V2o-Zk-KzH" secondAttribute="centerX" id="sxK-Uz-7CE"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="NJA-rF-sMi" secondAttribute="trailing" constant="40" id="vip-1Q-mml"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="cameraV" destination="NJA-rF-sMi" id="5Rh-ZR-18U"/>
<outlet property="flashView" destination="bLN-cP-2sK" id="s06-Sk-mgI"/>
</connections>
<point key="canvasLocation" x="189.85507246376812" y="101.78571428571428"/>
</view>
</objects>
<resources>
<image name="camera" width="48" height="48"/>
<image name="flashlight" width="48" height="48"/>
</resources>
</document>

View File

@ -6,6 +6,7 @@
// //
import UIKit import UIKit
import SDWebImage
class WP_WallpaperCollectionCell: UICollectionViewCell { class WP_WallpaperCollectionCell: UICollectionViewCell {
@ -15,5 +16,13 @@ class WP_WallpaperCollectionCell: UICollectionViewCell {
self.wpImagV.layer.cornerRadius = 10 self.wpImagV.layer.cornerRadius = 10
self.wpImagV.clipsToBounds = true self.wpImagV.clipsToBounds = true
} }
var model:WP_4KModel?{
didSet{
if let imageURL = URL(string: model!.thumbnail ?? "") {
// wpImagV.sd_setImage(with: imageURL, completed: nil)
wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
}
}
}
} }

View File

@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>Wallpaper Home needs access to your photo album to update your profile picture, save wallpapers to your album, and share updates within the community.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Wallpaper Home needs access to your photo album to update your profile picture, save wallpapers to your album, and share updates within the community.</string>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>

View File

@ -0,0 +1,20 @@
//
// WP_AboutVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
class WP_AboutVC: WP_RootVC {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func back(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}
}

View File

@ -0,0 +1,77 @@
<?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_1" 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_AboutVC" customModule="WallpaperHD_Live" 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="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="yn1-OI-rfk">
<rect key="frame" x="147" y="108" width="120" height="120"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="Uw6-Cc-LDN"/>
<constraint firstAttribute="height" constant="120" id="kZN-S6-XMx"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mine" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ZS-PO-y6g">
<rect key="frame" x="180" y="48" width="54.5" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cbW-U5-RSd">
<rect key="frame" x="20" y="37" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="JPm-xN-sRh"/>
<constraint firstAttribute="height" constant="50" id="wHT-7o-dVM"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="FSk-PH-URH"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="I hope to bring you a good user experience" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zMb-Df-bxr">
<rect key="frame" x="10" y="238" width="394" height="21"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="zMb-Df-bxr" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="25H-ct-Zcp"/>
<constraint firstItem="yn1-OI-rfk" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="B5C-8T-jEj"/>
<constraint firstItem="yn1-OI-rfk" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="60" id="BCo-nD-ort"/>
<constraint firstItem="8ZS-PO-y6g" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Bf8-vo-Ho6"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="zMb-Df-bxr" secondAttribute="trailing" constant="10" id="C1i-tM-Ryu"/>
<constraint firstItem="zMb-Df-bxr" firstAttribute="top" secondItem="yn1-OI-rfk" secondAttribute="bottom" constant="10" id="Nz7-mf-j6z"/>
<constraint firstItem="zMb-Df-bxr" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="QFs-dP-KsT"/>
<constraint firstItem="8ZS-PO-y6g" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="pf1-F1-xdX"/>
<constraint firstItem="cbW-U5-RSd" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="v98-Pj-KMy"/>
<constraint firstItem="cbW-U5-RSd" firstAttribute="centerY" secondItem="8ZS-PO-y6g" secondAttribute="centerY" id="w58-qq-uka"/>
</constraints>
<point key="canvasLocation" x="48" y="-12"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,98 @@
//
// WP_CollectionVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
class WP_CollectionVC: WP_RootVC {
@IBOutlet weak var dataView: UIView!
@IBOutlet weak var collectionView: UICollectionView!
var model = [WP_4KModel]()
var modeltype = [WallpaperData]()
override func viewDidLoad() {
super.viewDidLoad()
setCollectionView()
}
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")
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isHidden = true
self.model = sc4kManager.shared.history
self.modeltype = scjpgManager.shared.history
if self.model.count + self.modeltype.count == 0{
self.dataView.isHidden = false
}else{
self.dataView.isHidden = true
}
}
@IBAction func back(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}
}
extension WP_CollectionVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.model.count + self.modeltype.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell
// if
if indexPath.item < self.model.count {
cell.model = self.model[indexPath.item]
}else{
let newIndex = indexPath.item - self.model.count
if newIndex < self.modeltype.count {
let model = self.modeltype[newIndex]
if let imageURL = URL(string: model.source ?? "") {
// wpImagV.sd_setImage(with: imageURL, completed: nil)
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
}
}
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let vc = WP_WallPaPerDetailsVC()
if indexPath.item < self.model.count {
vc.model = self.model[indexPath.item]
vc.type = 1
navigationController?.pushViewController(vc, animated: true)
}else{
let newIndex = indexPath.item - self.model.count
if newIndex < self.modeltype.count {
vc.type = 2
vc.modeltype = self.modeltype[newIndex]
navigationController?.pushViewController(vc, animated: true)
}
}
}
}

View File

@ -0,0 +1,96 @@
<?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_CollectionVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="qgr-0W-H4Y" id="mwJ-SF-Z7E"/>
<outlet property="dataView" destination="Y00-oF-ELn" id="Smi-H0-a0f"/>
<outlet property="view" destination="p9m-42-6b9" id="Cfy-RA-hZp"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="p9m-42-6b9">
<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="qgr-0W-H4Y">
<rect key="frame" x="0.0" y="119" width="393" height="699"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="9iY-7t-Cf8">
<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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Y00-oF-ELn">
<rect key="frame" x="46.666666666666657" y="276" width="300" height="300"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="nodata" translatesAutoresizingMaskIntoConstraints="NO" id="6Iy-de-Ja1">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="eQe-XQ-Eal"/>
<constraint firstAttribute="height" constant="300" id="hDd-6A-Dmh"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="6Iy-de-Ja1" firstAttribute="centerX" secondItem="Y00-oF-ELn" secondAttribute="centerX" id="8tW-yn-QhV"/>
<constraint firstAttribute="height" constant="300" id="FSv-jS-S9s"/>
<constraint firstItem="6Iy-de-Ja1" firstAttribute="centerY" secondItem="Y00-oF-ELn" secondAttribute="centerY" id="OSf-xZ-kBb"/>
<constraint firstAttribute="width" constant="300" id="YX6-EW-YzM"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="collect" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9lw-5B-QHI">
<rect key="frame" x="158.66666666666666" y="64" width="76" height="30"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="25"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DQI-RF-4eG">
<rect key="frame" x="20" y="59" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="D1M-w1-akb"/>
<constraint firstAttribute="height" constant="40" id="bdF-Dq-FBb"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="Wbz-py-nBl"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="YTc-Gk-jiK"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="DQI-RF-4eG" firstAttribute="top" secondItem="YTc-Gk-jiK" secondAttribute="top" id="8Wr-Tg-08F"/>
<constraint firstItem="Y00-oF-ELn" firstAttribute="centerX" secondItem="p9m-42-6b9" secondAttribute="centerX" id="9sT-8s-d1S"/>
<constraint firstItem="YTc-Gk-jiK" firstAttribute="trailing" secondItem="qgr-0W-H4Y" secondAttribute="trailing" id="Kqt-lP-ACU"/>
<constraint firstItem="DQI-RF-4eG" firstAttribute="centerY" secondItem="9lw-5B-QHI" secondAttribute="centerY" id="U4C-81-Q7q"/>
<constraint firstItem="qgr-0W-H4Y" firstAttribute="top" secondItem="YTc-Gk-jiK" secondAttribute="top" constant="60" id="W66-tA-ljo"/>
<constraint firstItem="DQI-RF-4eG" firstAttribute="leading" secondItem="YTc-Gk-jiK" secondAttribute="leading" constant="20" id="XvY-RL-0qB"/>
<constraint firstItem="YTc-Gk-jiK" firstAttribute="bottom" secondItem="qgr-0W-H4Y" secondAttribute="bottom" id="Zjm-Ea-qky"/>
<constraint firstItem="Y00-oF-ELn" firstAttribute="centerY" secondItem="p9m-42-6b9" secondAttribute="centerY" id="bAe-Dc-HFM"/>
<constraint firstItem="9lw-5B-QHI" firstAttribute="centerX" secondItem="p9m-42-6b9" secondAttribute="centerX" id="h7o-F6-yrh"/>
<constraint firstItem="qgr-0W-H4Y" firstAttribute="leading" secondItem="YTc-Gk-jiK" secondAttribute="leading" id="xqZ-CY-c4G"/>
</constraints>
<point key="canvasLocation" x="132" y="-11"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<image name="nodata" width="792" height="434"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,61 @@
//
// WP_FeedVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
import SVProgressHUD
class WP_FeedVC: WP_RootVC,UITextViewDelegate {
@IBOutlet weak var feedTextV: UITextView!
@IBOutlet weak var sureBtn: UIButton!
let placeholderLabel = UILabel()
override func viewDidLoad() {
super.viewDidLoad()
// Label
placeholderLabel.text = "Please enter the content..."
placeholderLabel.textColor = UIColor.lightGray
placeholderLabel.frame = CGRect(x: 5, y: 8, width: feedTextV.frame.width - 10, height: 20)
feedTextV.addSubview(placeholderLabel)
feedTextV.layer.cornerRadius = 10
feedTextV.layer.borderColor = UIColor.black.cgColor
feedTextV.layer.borderWidth = 1
sureBtn.layer.cornerRadius = 10
}
func textViewDidChange(_ textView: UITextView) {
placeholderLabel.isHidden = !textView.text.isEmpty
}
@IBAction func back(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}
@IBAction func sure(_ sender: Any) {
if feedTextV.text.count <= 0 {
SVProgressHUD.showInfo(withStatus: "Please enter your feedback")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
}else{
SVProgressHUD.showSuccess(withStatus: "Thank you for your valuable feedback")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
self.feedTextV.text = ""
self.navigationController?.popViewController(animated: true)
}
}
}

View File

@ -0,0 +1,97 @@
<?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_1" 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_FeedVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="feedTextV" destination="df6-Xj-YVV" id="pri-IO-uSk"/>
<outlet property="sureBtn" destination="V48-uG-Fbw" id="laE-lJ-hR7"/>
<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="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mine" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a6t-Zy-ewm">
<rect key="frame" x="180" y="48" width="54.5" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JOg-vH-17U">
<rect key="frame" x="20" y="37" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="BqZ-2F-xyU"/>
<constraint firstAttribute="width" constant="50" id="WSb-vJ-O6l"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="BKO-Wh-lb1"/>
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="df6-Xj-YVV">
<rect key="frame" x="20" y="95.5" width="374" height="160"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="160" id="TEI-0d-Wb4"/>
</constraints>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V48-uG-Fbw">
<rect key="frame" x="127" y="275.5" width="160" height="50"/>
<color key="backgroundColor" systemColor="systemBrownColor"/>
<constraints>
<constraint firstAttribute="width" constant="160" id="IyN-ld-FRJ"/>
<constraint firstAttribute="height" constant="50" id="P44-2v-PBz"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="19"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Sure">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="sure:" destination="-1" eventType="touchUpInside" id="Mj1-rV-oEs"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="JOg-vH-17U" firstAttribute="centerY" secondItem="a6t-Zy-ewm" secondAttribute="centerY" id="8K4-ye-uhi"/>
<constraint firstItem="df6-Xj-YVV" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="9f3-gW-qS4"/>
<constraint firstItem="JOg-vH-17U" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="D6I-jK-t0p"/>
<constraint firstItem="a6t-Zy-ewm" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Rzg-BJ-JcI"/>
<constraint firstItem="V48-uG-Fbw" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="d9W-2w-Isv"/>
<constraint firstItem="df6-Xj-YVV" firstAttribute="top" secondItem="a6t-Zy-ewm" secondAttribute="bottom" constant="20" id="ebO-SX-0OQ"/>
<constraint firstItem="V48-uG-Fbw" firstAttribute="top" secondItem="df6-Xj-YVV" secondAttribute="bottom" constant="20" id="fge-dP-n9o"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="df6-Xj-YVV" secondAttribute="trailing" constant="20" id="k4v-hw-P7I"/>
<constraint firstItem="a6t-Zy-ewm" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="tsC-Dx-ao7"/>
</constraints>
<point key="canvasLocation" x="24" y="-24"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBrownColor">
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,87 @@
//
// WP_LockVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
import SVProgressHUD
class WP_LockVC: WP_RootVC {
@IBOutlet weak var backBtn: UIButton!
@IBOutlet weak var sure: UIButton!
@IBOutlet weak var paypassView: SPayPassWordView!
var type:Int = 0
var code:String?
override func viewDidLoad() {
super.viewDidLoad()
sure.layer.cornerRadius = 10
paypassView.delegate = self
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
if self.type == 0{
self.backBtn.isHidden = true
}else{
self.backBtn.isHidden = false
}
}
@IBAction func back(_ sender: Any) {
dismiss(animated: true)
}
@IBAction func sure(_ sender: Any) {
let userDefaults = UserDefaults.standard
if userDefaults.bool(forKey: "islock"){
let codestr = userDefaults.value(forKey: "lockcode")
if self.code == codestr as? String{
if self.type == 0 {
SVProgressHUD.showInfo(withStatus: "Password is correct")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
WP_TabbarCommon.TabBarController()
}else{
userDefaults.set(false, forKey: "islock")
SVProgressHUD.showInfo(withStatus: "Close lock successfully")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
self.dismiss(animated: true)
}
}else{
SVProgressHUD.showInfo(withStatus: "wrong password")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
}
}else{
userDefaults.set(self.code, forKey: "lockcode")
userDefaults.set(true, forKey: "islock")
SVProgressHUD.showInfo(withStatus: "Set lock successfully")
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
SVProgressHUD.dismiss()
}
self.dismiss(animated: true)
}
}
}
extension WP_LockVC:SPayPassWordViewDelegate{
func entryComplete(password: String) {
self.code = password
}
}

View File

@ -0,0 +1,107 @@
<?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_1" 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_LockVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="backBtn" destination="EdW-s3-0RS" id="mfd-jO-7h8"/>
<outlet property="paypassView" destination="mue-uf-fyQ" id="8KB-TB-CWI"/>
<outlet property="sure" destination="pxi-FZ-OQy" id="0r8-CY-9dh"/>
<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="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mue-uf-fyQ" customClass="SPayPassWordView" customModule="WallpaperHD_Live" customModuleProvider="target">
<rect key="frame" x="20" y="128" width="374" height="44"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="MGx-wW-WQR"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="lenght">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="star" value="*"/>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="starColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EdW-s3-0RS">
<rect key="frame" x="20" y="42" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="dI6-k5-e3L"/>
<constraint firstAttribute="width" constant="40" id="i2M-Te-Hhe"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="0Py-9E-R9U"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LOCK" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8y8-Xz-Kfi">
<rect key="frame" x="175.5" y="48" width="63" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pxi-FZ-OQy">
<rect key="frame" x="117" y="232" width="180" height="44"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="180" id="0b4-Qu-45X"/>
<constraint firstAttribute="height" constant="44" id="HbL-jm-6Dx"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="21"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Sure">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="sure:" destination="-1" eventType="touchUpInside" id="XgB-Y8-ach"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="pxi-FZ-OQy" firstAttribute="top" secondItem="mue-uf-fyQ" secondAttribute="bottom" constant="60" id="4dP-MF-wZR"/>
<constraint firstItem="mue-uf-fyQ" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="80" id="Gtr-3Y-bCt"/>
<constraint firstItem="EdW-s3-0RS" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="I8y-I4-yck"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="mue-uf-fyQ" secondAttribute="trailing" constant="20" id="V9s-Lz-GCY"/>
<constraint firstItem="EdW-s3-0RS" firstAttribute="centerY" secondItem="8y8-Xz-Kfi" secondAttribute="centerY" id="XsU-Lf-Eja"/>
<constraint firstItem="pxi-FZ-OQy" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="amc-Jc-aoF"/>
<constraint firstItem="mue-uf-fyQ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="jQX-Dm-NlY"/>
<constraint firstItem="8y8-Xz-Kfi" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="mwS-SX-nsF"/>
<constraint firstItem="8y8-Xz-Kfi" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="x8V-X6-wjE"/>
</constraints>
<point key="canvasLocation" x="48" y="-12"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -8,11 +8,93 @@
import UIKit import UIKit
class WP_MineVC: WP_RootVC { class WP_MineVC: WP_RootVC {
@IBOutlet weak var aboutV: UIView!
@IBOutlet weak var phototView: UIView!
@IBOutlet weak var collectView: UIView!
@IBOutlet weak var privacyView: UIView!
@IBOutlet weak var feedView: UIView!
@IBOutlet weak var userView: UIView!
@IBOutlet weak var lockView: UIView!
@IBOutlet weak var lockIsopen: UILabel!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
aboutV.layer.cornerRadius = 10
collectView.layer.cornerRadius = 10
privacyView.layer.cornerRadius = 10
feedView.layer.cornerRadius = 10
userView.layer.cornerRadius = 10
lockView.layer.cornerRadius = 10
phototView.layer.cornerRadius = 10
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
let userDefaults = UserDefaults.standard
if userDefaults.bool(forKey: "islock"){
self.lockIsopen.text = "open"
}else{
self.lockIsopen.text = "closed"
}
}
@IBAction func baboutBtn(_ sender: Any) {
let vc = WP_AboutVC()
navigationController?.pushViewController(vc, animated: true)
}
@IBAction func photoBtn(_ sender: Any) {
let vc = WP_PhotoAlbumVC()
navigationController?.pushViewController(vc, animated: true)
}
@IBAction func privacyBtn(_ sender: Any) {
let vc = WP_PrivacyVC()
vc.type = 0
self.present(vc, animated: true)
}
@IBAction func collectionbtn(_ sender: Any) {
let vc = WP_CollectionVC()
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func feedBtn(_ sender: Any) {
let vc = WP_FeedVC()
navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func usag(_ sender: Any) {
let vc = WP_PrivacyVC()
vc.type = 1
self.present(vc, animated: true)
}
@IBAction func lock(_ sender: Any) {
let vc = WP_LockVC()
vc.modalPresentationStyle = .fullScreen
vc.type = 1
self.present(vc, animated: true)
}
} }

View File

@ -11,6 +11,14 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_MineVC" customModule="WallpaperHD_Live" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WP_MineVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections> <connections>
<outlet property="aboutV" destination="ILs-G9-o05" id="qVI-Yk-3ir"/>
<outlet property="collectView" destination="cyL-T6-KQd" id="TrF-b2-Pn1"/>
<outlet property="feedView" destination="JfU-6J-vjV" id="nmY-GV-j23"/>
<outlet property="lockIsopen" destination="CPJ-Hi-JVY" id="PSU-LM-oBc"/>
<outlet property="lockView" destination="MxQ-ri-fEb" id="yrv-ka-PHL"/>
<outlet property="phototView" destination="weq-vL-NFC" id="Bhr-XV-peC"/>
<outlet property="privacyView" destination="qVq-9Z-lcW" id="8rX-Uz-2cY"/>
<outlet property="userView" destination="C1J-K7-gh1" id="2lh-64-iFV"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
@ -19,8 +27,8 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="About US" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gdb-2u-fIh"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mine" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gdb-2u-fIh">
<rect key="frame" x="154.5" y="58" width="105.5" height="27.5"/> <rect key="frame" x="180" y="58" width="54.5" height="27.5"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/> <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="23"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@ -40,10 +48,21 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PN7-k4-2Lk">
<rect key="frame" x="0.0" y="0.0" width="193" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="baboutBtn:" destination="-1" eventType="touchUpInside" id="4Jw-e8-Dji"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBrownColor"/> <color key="backgroundColor" systemColor="systemBrownColor"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="PN7-k4-2Lk" secondAttribute="bottom" id="7Ro-Jt-411"/>
<constraint firstItem="PN7-k4-2Lk" firstAttribute="top" secondItem="ILs-G9-o05" secondAttribute="top" id="MPG-ah-kdg"/>
<constraint firstItem="9NJ-Ad-riB" firstAttribute="centerX" secondItem="ILs-G9-o05" secondAttribute="centerX" id="SAa-0I-p1U"/> <constraint firstItem="9NJ-Ad-riB" firstAttribute="centerX" secondItem="ILs-G9-o05" secondAttribute="centerX" id="SAa-0I-p1U"/>
<constraint firstItem="PN7-k4-2Lk" firstAttribute="leading" secondItem="ILs-G9-o05" secondAttribute="leading" id="UXZ-S5-yZN"/>
<constraint firstAttribute="trailing" secondItem="PN7-k4-2Lk" secondAttribute="trailing" id="aG6-kv-J1u"/>
<constraint firstItem="9NJ-Ad-riB" firstAttribute="centerY" secondItem="ILs-G9-o05" secondAttribute="centerY" id="w2Y-Ad-GT1"/> <constraint firstItem="9NJ-Ad-riB" firstAttribute="centerY" secondItem="ILs-G9-o05" secondAttribute="centerY" id="w2Y-Ad-GT1"/>
</constraints> </constraints>
</view> </view>
@ -65,11 +84,22 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z6x-L2-t0z">
<rect key="frame" x="0.0" y="0.0" width="191" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="collectionbtn:" destination="-1" eventType="touchUpInside" id="8iw-5Q-jKC"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBrownColor"/> <color key="backgroundColor" systemColor="systemBrownColor"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="Z6x-L2-t0z" secondAttribute="trailing" id="Tnu-pw-W5P"/>
<constraint firstItem="wGp-xY-Eal" firstAttribute="centerX" secondItem="cyL-T6-KQd" secondAttribute="centerX" id="dWm-wQ-zxt"/> <constraint firstItem="wGp-xY-Eal" firstAttribute="centerX" secondItem="cyL-T6-KQd" secondAttribute="centerX" id="dWm-wQ-zxt"/>
<constraint firstItem="wGp-xY-Eal" firstAttribute="centerY" secondItem="cyL-T6-KQd" secondAttribute="centerY" id="da0-V4-HXO"/> <constraint firstItem="wGp-xY-Eal" firstAttribute="centerY" secondItem="cyL-T6-KQd" secondAttribute="centerY" id="da0-V4-HXO"/>
<constraint firstItem="Z6x-L2-t0z" firstAttribute="top" secondItem="cyL-T6-KQd" secondAttribute="top" id="ee2-DQ-5Lg"/>
<constraint firstItem="Z6x-L2-t0z" firstAttribute="leading" secondItem="cyL-T6-KQd" secondAttribute="leading" id="hek-ds-gn2"/>
<constraint firstAttribute="bottom" secondItem="Z6x-L2-t0z" secondAttribute="bottom" id="kkP-eU-mnk"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
@ -102,13 +132,24 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yMh-OL-HV4">
<rect key="frame" x="0.0" y="0.0" width="198" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="privacyBtn:" destination="-1" eventType="touchUpInside" id="atv-8t-YVA"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="qVq-9Z-lcW" secondAttribute="trailing" constant="5" id="4ob-Q2-5SF"/> <constraint firstAttribute="trailing" secondItem="qVq-9Z-lcW" secondAttribute="trailing" constant="5" id="4ob-Q2-5SF"/>
<constraint firstAttribute="trailing" secondItem="yMh-OL-HV4" secondAttribute="trailing" id="8GA-Eu-yjG"/>
<constraint firstItem="yMh-OL-HV4" firstAttribute="top" secondItem="iGY-0M-TGj" secondAttribute="top" id="LZq-jM-Seg"/>
<constraint firstItem="uP9-Pw-WiS" firstAttribute="centerY" secondItem="iGY-0M-TGj" secondAttribute="centerY" id="ORi-0U-hgJ"/> <constraint firstItem="uP9-Pw-WiS" firstAttribute="centerY" secondItem="iGY-0M-TGj" secondAttribute="centerY" id="ORi-0U-hgJ"/>
<constraint firstItem="qVq-9Z-lcW" firstAttribute="top" secondItem="iGY-0M-TGj" secondAttribute="top" id="UJm-ox-uZZ"/> <constraint firstItem="qVq-9Z-lcW" firstAttribute="top" secondItem="iGY-0M-TGj" secondAttribute="top" id="UJm-ox-uZZ"/>
<constraint firstAttribute="bottom" secondItem="qVq-9Z-lcW" secondAttribute="bottom" id="YD2-te-QGd"/> <constraint firstAttribute="bottom" secondItem="qVq-9Z-lcW" secondAttribute="bottom" id="YD2-te-QGd"/>
<constraint firstAttribute="bottom" secondItem="yMh-OL-HV4" secondAttribute="bottom" id="dYQ-Ny-6Tv"/>
<constraint firstItem="yMh-OL-HV4" firstAttribute="leading" secondItem="iGY-0M-TGj" secondAttribute="leading" id="nVn-K3-cAw"/>
<constraint firstItem="uP9-Pw-WiS" firstAttribute="centerX" secondItem="iGY-0M-TGj" secondAttribute="centerX" id="qFU-q1-m4I"/> <constraint firstItem="uP9-Pw-WiS" firstAttribute="centerX" secondItem="iGY-0M-TGj" secondAttribute="centerX" id="qFU-q1-m4I"/>
<constraint firstItem="qVq-9Z-lcW" firstAttribute="leading" secondItem="iGY-0M-TGj" secondAttribute="leading" id="y1L-mg-kWP"/> <constraint firstItem="qVq-9Z-lcW" firstAttribute="leading" secondItem="iGY-0M-TGj" secondAttribute="leading" id="y1L-mg-kWP"/>
</constraints> </constraints>
@ -122,11 +163,22 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iWG-XH-lnH">
<rect key="frame" x="0.0" y="0.0" width="191" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="feedBtn:" destination="-1" eventType="touchUpInside" id="shh-M9-LL6"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBrownColor"/> <color key="backgroundColor" systemColor="systemBrownColor"/>
<constraints> <constraints>
<constraint firstItem="iWG-XH-lnH" firstAttribute="leading" secondItem="JfU-6J-vjV" secondAttribute="leading" id="His-PK-c0D"/>
<constraint firstAttribute="trailing" secondItem="iWG-XH-lnH" secondAttribute="trailing" id="KP0-LJ-KjX"/>
<constraint firstItem="6t0-0p-aho" firstAttribute="centerX" secondItem="JfU-6J-vjV" secondAttribute="centerX" id="SnD-Fl-mRO"/> <constraint firstItem="6t0-0p-aho" firstAttribute="centerX" secondItem="JfU-6J-vjV" secondAttribute="centerX" id="SnD-Fl-mRO"/>
<constraint firstAttribute="bottom" secondItem="iWG-XH-lnH" secondAttribute="bottom" id="qjv-WA-4Gt"/>
<constraint firstItem="6t0-0p-aho" firstAttribute="centerY" secondItem="JfU-6J-vjV" secondAttribute="centerY" id="ua0-q0-zXf"/> <constraint firstItem="6t0-0p-aho" firstAttribute="centerY" secondItem="JfU-6J-vjV" secondAttribute="centerY" id="ua0-q0-zXf"/>
<constraint firstItem="iWG-XH-lnH" firstAttribute="top" secondItem="JfU-6J-vjV" secondAttribute="top" id="whJ-JN-gtc"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
@ -143,18 +195,159 @@
<constraint firstAttribute="height" constant="100" id="eFc-16-YBP"/> <constraint firstAttribute="height" constant="100" id="eFc-16-YBP"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4S0-3t-wiH">
<rect key="frame" x="10" y="345.5" width="394" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zWR-5M-ZT0">
<rect key="frame" x="0.0" y="0.0" width="198" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C1J-K7-gh1">
<rect key="frame" x="0.0" y="0.0" width="193" height="100"/>
<color key="backgroundColor" systemColor="systemBrownColor"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User Agreement" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iEi-gq-7HR">
<rect key="frame" x="19.5" y="38" width="159.5" height="24"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aJX-R4-G1G">
<rect key="frame" x="0.0" y="0.0" width="198" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="usag:" destination="-1" eventType="touchUpInside" id="eWc-tX-ZgB"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="C1J-K7-gh1" firstAttribute="leading" secondItem="zWR-5M-ZT0" secondAttribute="leading" id="32z-cf-ziM"/>
<constraint firstItem="iEi-gq-7HR" firstAttribute="centerX" secondItem="zWR-5M-ZT0" secondAttribute="centerX" id="Nhb-f5-xFw"/>
<constraint firstAttribute="trailing" secondItem="C1J-K7-gh1" secondAttribute="trailing" constant="5" id="OV7-I8-bWW"/>
<constraint firstItem="iEi-gq-7HR" firstAttribute="centerY" secondItem="zWR-5M-ZT0" secondAttribute="centerY" id="Qjp-Uz-xQS"/>
<constraint firstItem="aJX-R4-G1G" firstAttribute="top" secondItem="zWR-5M-ZT0" secondAttribute="top" id="SKy-yv-FHe"/>
<constraint firstItem="aJX-R4-G1G" firstAttribute="leading" secondItem="zWR-5M-ZT0" secondAttribute="leading" id="Sn5-2A-DHD"/>
<constraint firstAttribute="trailing" secondItem="aJX-R4-G1G" secondAttribute="trailing" id="VxI-1v-AWQ"/>
<constraint firstAttribute="bottom" secondItem="aJX-R4-G1G" secondAttribute="bottom" id="pcG-8K-6ai"/>
<constraint firstAttribute="bottom" secondItem="C1J-K7-gh1" secondAttribute="bottom" id="qqx-48-6hl"/>
<constraint firstItem="C1J-K7-gh1" firstAttribute="top" secondItem="zWR-5M-ZT0" secondAttribute="top" id="sq2-rZ-zsX"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MxQ-ri-fEb">
<rect key="frame" x="203" y="0.0" width="191" height="100"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="App Lock" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v3J-IJ-48K">
<rect key="frame" x="50" y="38" width="91" height="24"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="open" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CPJ-Hi-JVY">
<rect key="frame" x="73.5" y="67" width="44.5" height="23"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="19"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z8R-2c-o6S">
<rect key="frame" x="0.0" y="0.0" width="191" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="lock:" destination="-1" eventType="touchUpInside" id="iJo-zt-OzR"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBrownColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Z8R-2c-o6S" secondAttribute="bottom" id="8yJ-iO-q8D"/>
<constraint firstItem="CPJ-Hi-JVY" firstAttribute="top" secondItem="v3J-IJ-48K" secondAttribute="bottom" constant="5" id="9qw-58-bba"/>
<constraint firstAttribute="trailing" secondItem="Z8R-2c-o6S" secondAttribute="trailing" id="MNe-ZA-ayf"/>
<constraint firstItem="v3J-IJ-48K" firstAttribute="centerY" secondItem="MxQ-ri-fEb" secondAttribute="centerY" id="MUf-vQ-ZEW"/>
<constraint firstItem="v3J-IJ-48K" firstAttribute="centerX" secondItem="MxQ-ri-fEb" secondAttribute="centerX" id="pQJ-QU-GK6"/>
<constraint firstItem="Z8R-2c-o6S" firstAttribute="leading" secondItem="MxQ-ri-fEb" secondAttribute="leading" id="reP-6c-Stf"/>
<constraint firstItem="Z8R-2c-o6S" firstAttribute="top" secondItem="MxQ-ri-fEb" secondAttribute="top" id="t7h-fa-Uiz"/>
<constraint firstItem="CPJ-Hi-JVY" firstAttribute="centerX" secondItem="MxQ-ri-fEb" secondAttribute="centerX" id="wsj-WR-TqS"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="MxQ-ri-fEb" firstAttribute="top" secondItem="4S0-3t-wiH" secondAttribute="top" id="3AO-Mj-E5X"/>
<constraint firstItem="zWR-5M-ZT0" firstAttribute="top" secondItem="4S0-3t-wiH" secondAttribute="top" id="EaW-XH-7GO"/>
<constraint firstItem="zWR-5M-ZT0" firstAttribute="width" secondItem="4S0-3t-wiH" secondAttribute="width" multiplier="1:2" constant="1" id="MXo-cm-VMb"/>
<constraint firstItem="MxQ-ri-fEb" firstAttribute="leading" secondItem="zWR-5M-ZT0" secondAttribute="trailing" constant="5" id="O89-LR-T2P"/>
<constraint firstItem="zWR-5M-ZT0" firstAttribute="leading" secondItem="4S0-3t-wiH" secondAttribute="leading" id="e8E-35-xXA"/>
<constraint firstAttribute="trailing" secondItem="MxQ-ri-fEb" secondAttribute="trailing" id="mV9-uB-KS1"/>
<constraint firstAttribute="bottom" secondItem="zWR-5M-ZT0" secondAttribute="bottom" id="qk4-sQ-Dt9"/>
<constraint firstAttribute="height" constant="100" id="umw-nH-mcJ"/>
<constraint firstAttribute="bottom" secondItem="MxQ-ri-fEb" secondAttribute="bottom" id="zPY-iw-0XM"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I2p-so-cUT">
<rect key="frame" x="10" y="465.5" width="394" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ttn-qd-CJ7">
<rect key="frame" x="0.0" y="0.0" width="198" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="weq-vL-NFC">
<rect key="frame" x="0.0" y="0.0" width="193" height="100"/>
<color key="backgroundColor" systemColor="systemBrownColor"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Photo Album" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kiw-GM-AKb">
<rect key="frame" x="36" y="38" width="126" height="24"/>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9KX-XW-4dK">
<rect key="frame" x="0.0" y="0.0" width="198" height="100"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<connections>
<action selector="photoBtn:" destination="-1" eventType="touchUpInside" id="HNo-k4-lwk"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="weq-vL-NFC" secondAttribute="trailing" constant="5" id="3Ll-6Y-Bw0"/>
<constraint firstAttribute="bottom" secondItem="weq-vL-NFC" secondAttribute="bottom" id="65I-X4-9jE"/>
<constraint firstItem="9KX-XW-4dK" firstAttribute="leading" secondItem="Ttn-qd-CJ7" secondAttribute="leading" id="CNp-4H-RYC"/>
<constraint firstItem="kiw-GM-AKb" firstAttribute="centerY" secondItem="Ttn-qd-CJ7" secondAttribute="centerY" id="Db5-S6-XHN"/>
<constraint firstItem="9KX-XW-4dK" firstAttribute="top" secondItem="Ttn-qd-CJ7" secondAttribute="top" id="IBf-7v-4Km"/>
<constraint firstAttribute="trailing" secondItem="9KX-XW-4dK" secondAttribute="trailing" id="NfB-rH-7kk"/>
<constraint firstItem="weq-vL-NFC" firstAttribute="leading" secondItem="Ttn-qd-CJ7" secondAttribute="leading" id="bsf-uo-LqU"/>
<constraint firstAttribute="bottom" secondItem="9KX-XW-4dK" secondAttribute="bottom" id="gM8-Eh-qYD"/>
<constraint firstItem="weq-vL-NFC" firstAttribute="top" secondItem="Ttn-qd-CJ7" secondAttribute="top" id="qXP-C7-czN"/>
<constraint firstItem="kiw-GM-AKb" firstAttribute="centerX" secondItem="Ttn-qd-CJ7" secondAttribute="centerX" id="qer-D9-lgr"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Ttn-qd-CJ7" firstAttribute="top" secondItem="I2p-so-cUT" secondAttribute="top" id="9Ag-LO-aBU"/>
<constraint firstItem="Ttn-qd-CJ7" firstAttribute="leading" secondItem="I2p-so-cUT" secondAttribute="leading" id="Eil-Sj-oz8"/>
<constraint firstAttribute="height" constant="100" id="gng-aW-bNm"/>
<constraint firstAttribute="bottom" secondItem="Ttn-qd-CJ7" secondAttribute="bottom" id="snr-hp-ZrZ"/>
<constraint firstItem="Ttn-qd-CJ7" firstAttribute="width" secondItem="I2p-so-cUT" secondAttribute="width" multiplier="1:2" constant="1" id="w1I-dE-twM"/>
</constraints>
</view>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstItem="OHV-w1-Awf" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="5my-To-LtZ"/> <constraint firstItem="OHV-w1-Awf" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="5my-To-LtZ"/>
<constraint firstItem="uRm-23-oaA" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="LRH-aN-TMa"/> <constraint firstItem="uRm-23-oaA" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="LRH-aN-TMa"/>
<constraint firstAttribute="trailing" secondItem="4S0-3t-wiH" secondAttribute="trailing" constant="10" id="NIu-Hf-gG1"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="OHV-w1-Awf" secondAttribute="trailing" constant="10" id="O48-XB-m4x"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="OHV-w1-Awf" secondAttribute="trailing" constant="10" id="O48-XB-m4x"/>
<constraint firstItem="gdb-2u-fIh" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="Ysw-4k-snx"/> <constraint firstItem="gdb-2u-fIh" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="Ysw-4k-snx"/>
<constraint firstItem="I2p-so-cUT" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="asO-jx-1QO"/>
<constraint firstItem="OHV-w1-Awf" firstAttribute="top" secondItem="uRm-23-oaA" secondAttribute="bottom" constant="20" id="br5-pF-e6C"/> <constraint firstItem="OHV-w1-Awf" firstAttribute="top" secondItem="uRm-23-oaA" secondAttribute="bottom" constant="20" id="br5-pF-e6C"/>
<constraint firstItem="I2p-so-cUT" firstAttribute="top" secondItem="4S0-3t-wiH" secondAttribute="bottom" constant="20" id="byN-Ip-biX"/>
<constraint firstItem="4S0-3t-wiH" firstAttribute="top" secondItem="OHV-w1-Awf" secondAttribute="bottom" constant="20" id="cJo-O1-Tsz"/>
<constraint firstItem="4S0-3t-wiH" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="fvM-ui-pil"/>
<constraint firstItem="gdb-2u-fIh" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="jMj-kn-Ca7"/> <constraint firstItem="gdb-2u-fIh" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="jMj-kn-Ca7"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="uRm-23-oaA" secondAttribute="trailing" constant="10" id="nMe-By-Nyz"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="uRm-23-oaA" secondAttribute="trailing" constant="10" id="nMe-By-Nyz"/>
<constraint firstItem="uRm-23-oaA" firstAttribute="top" secondItem="gdb-2u-fIh" secondAttribute="bottom" constant="20" id="tRh-jp-fcD"/> <constraint firstItem="uRm-23-oaA" firstAttribute="top" secondItem="gdb-2u-fIh" secondAttribute="bottom" constant="20" id="tRh-jp-fcD"/>
<constraint firstAttribute="trailing" secondItem="I2p-so-cUT" secondAttribute="trailing" constant="10" id="yMv-D9-71q"/>
</constraints> </constraints>
<point key="canvasLocation" x="65" y="-11"/> <point key="canvasLocation" x="65" y="-11"/>
</view> </view>

View File

@ -0,0 +1,140 @@
//
// WP_PhotoAlbumVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/23.
//
import UIKit
import Photos
class WP_PhotoAlbumVC: WP_RootVC {
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var dataView: UIView!
var model = [WP_PhotoAlbum]()
override func viewDidLoad() {
super.viewDidLoad()
setCollectionView()
}
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")
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
let retrievedModels = PreferencesManager.shared.retrieveRakModels()
if retrievedModels != nil{
self.model = retrievedModels!
}else{
}
if self.model.count == 0{
self.dataView.isHidden = false
}else{
self.dataView.isHidden = true
}
}
@IBAction func add(_ sender: Any) {
let imagePicker = UIImagePickerController()
imagePicker.sourceType = .photoLibrary
imagePicker.delegate = self
present(imagePicker, animated: true, completion: nil)
}
@IBAction func back(_ sender: Any) {
self.navigationController?.popViewController(animated: true)
}
// UIImage
func convertImageToString(image: UIImage) -> String? {
if let imageData = image.jpegData(compressionQuality: 1.0) {
// Base64
let base64String = imageData.base64EncodedString()
return base64String
}
return nil
}
// Base64
func convertStringToImage(base64String: String) -> UIImage? {
if let imageData = Data(base64Encoded: base64String) {
if let image = UIImage(data: imageData) {
return image
}
}
return nil
}
}
extension WP_PhotoAlbumVC:UIImagePickerControllerDelegate, UINavigationControllerDelegate{
//
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
picker.dismiss(animated: true, completion: nil)
//
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
// UserDefaults
// saveImageToUserDefaults(image, forKey: "selectedImage")
let base64imgString = convertImageToString(image: image)
let dataModel1 = WP_PhotoAlbum( img: base64imgString)
PreferencesManager.shared.addRakModel(dataModel1)
let retrievedModels = PreferencesManager.shared.retrieveRakModels()
if retrievedModels != nil{
self.model = retrievedModels!
self.collectionView.reloadData()
}else{
}
if self.model.count == 0{
self.dataView.isHidden = false
}else{
self.dataView.isHidden = true
}
}
}
//
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
picker.dismiss(animated: true, completion: nil)
}
}
extension WP_PhotoAlbumVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return model.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WP_WallpaperCollectionCell", for: indexPath)as!WP_WallpaperCollectionCell
let data = self.model[indexPath.row]
cell.wpImagV.image = convertStringToImage(base64String: data.img ?? "")
return cell
}
}

View File

@ -0,0 +1,113 @@
<?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_1" 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_PhotoAlbumVC" customModule="WallpaperHD_Live" customModuleProvider="target">
<connections>
<outlet property="collectionView" destination="l2u-Vd-pYx" id="jmX-QL-9hJ"/>
<outlet property="dataView" destination="gSV-Mu-H2z" id="f8i-LY-lp3"/>
<outlet property="view" destination="Xqj-Nj-0um" id="3Lw-No-WoP"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Xqj-Nj-0um">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="l2u-Vd-pYx">
<rect key="frame" x="0.0" y="108" width="414" height="754"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="8fv-fk-xwg">
<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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gSV-Mu-H2z">
<rect key="frame" x="57" y="298" width="300" height="300"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="nodata" translatesAutoresizingMaskIntoConstraints="NO" id="loy-4V-oPd">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="VBY-Ve-GmJ"/>
<constraint firstAttribute="height" constant="300" id="Vff-AI-T4r"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="3mS-t8-PaL"/>
<constraint firstAttribute="height" constant="300" id="AtJ-WX-PKz"/>
<constraint firstItem="loy-4V-oPd" firstAttribute="centerY" secondItem="gSV-Mu-H2z" secondAttribute="centerY" id="OnW-ZW-XLe"/>
<constraint firstItem="loy-4V-oPd" firstAttribute="centerX" secondItem="gSV-Mu-H2z" secondAttribute="centerX" id="Qsg-9R-bLL"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="photo Album" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zbh-dk-Jva">
<rect key="frame" x="134.5" y="53" width="145.5" height="30"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="25"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4fH-6z-Mct">
<rect key="frame" x="20" y="48" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="3Oj-9R-YRv"/>
<constraint firstAttribute="height" constant="40" id="eIa-nP-rVo"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="back_black"/>
<connections>
<action selector="back:" destination="-1" eventType="touchUpInside" id="M5V-5o-Jq1"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xxG-Wj-M3C">
<rect key="frame" x="344" y="48" width="60" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="d3t-gy-xMN"/>
<constraint firstAttribute="height" constant="40" id="huo-TZ-icm"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Add">
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="add:" destination="-1" eventType="touchUpInside" id="CJb-tV-zNY"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="16u-dN-tiD"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="l2u-Vd-pYx" firstAttribute="top" secondItem="16u-dN-tiD" secondAttribute="top" constant="60" id="6cR-bV-jXU"/>
<constraint firstItem="xxG-Wj-M3C" firstAttribute="centerY" secondItem="Zbh-dk-Jva" secondAttribute="centerY" id="BJ3-y9-csU"/>
<constraint firstItem="16u-dN-tiD" firstAttribute="bottom" secondItem="l2u-Vd-pYx" secondAttribute="bottom" id="FbH-Sc-z3R"/>
<constraint firstItem="l2u-Vd-pYx" firstAttribute="leading" secondItem="16u-dN-tiD" secondAttribute="leading" id="NiJ-kT-fXX"/>
<constraint firstItem="16u-dN-tiD" firstAttribute="trailing" secondItem="l2u-Vd-pYx" secondAttribute="trailing" id="ODh-Ew-pFp"/>
<constraint firstItem="gSV-Mu-H2z" firstAttribute="centerX" secondItem="Xqj-Nj-0um" secondAttribute="centerX" id="Wrm-RS-zOM"/>
<constraint firstItem="4fH-6z-Mct" firstAttribute="leading" secondItem="16u-dN-tiD" secondAttribute="leading" constant="20" id="ZTb-Vl-FEO"/>
<constraint firstItem="4fH-6z-Mct" firstAttribute="top" secondItem="16u-dN-tiD" secondAttribute="top" id="foV-Lw-2uf"/>
<constraint firstItem="Zbh-dk-Jva" firstAttribute="centerX" secondItem="Xqj-Nj-0um" secondAttribute="centerX" id="iDc-yj-lWK"/>
<constraint firstItem="4fH-6z-Mct" firstAttribute="centerY" secondItem="Zbh-dk-Jva" secondAttribute="centerY" id="rmP-aX-wbc"/>
<constraint firstItem="16u-dN-tiD" firstAttribute="trailing" secondItem="xxG-Wj-M3C" secondAttribute="trailing" constant="10" id="sZR-Ku-Tc3"/>
<constraint firstItem="gSV-Mu-H2z" firstAttribute="centerY" secondItem="Xqj-Nj-0um" secondAttribute="centerY" id="teO-zq-3iZ"/>
</constraints>
<point key="canvasLocation" x="132" y="-11"/>
</view>
</objects>
<resources>
<image name="back_black" width="20" height="20"/>
<image name="nodata" width="792" height="434"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@ -0,0 +1,38 @@
//
// WP_PrivacyVC.swift
// WallpaperHD_Live
//
// Created by 16 on 2024/7/22.
//
import UIKit
import WebKit
class WP_PrivacyVC: WP_RootVC {
var webView: WKWebView!
var type:Int = 0
override func viewDidLoad() {
super.viewDidLoad()
webView = WKWebView()
view = webView
if type == 0 {
if let url = URL(string: "https://wallpaperhomewail.bitbucket.io/privacy.html") {
let request = URLRequest(url: url)
webView.load(request)
}
}else{
if let url = URL(string: "https://wallpaperhomewail.bitbucket.io/terms.html") {
let request = URLRequest(url: url)
webView.load(request)
}
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
}
}

View File

@ -78,14 +78,14 @@ extension WP_RankingVC:FSPagerViewDelegate,FSPagerViewDataSource{
cell.wallpaperImageV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle")) cell.wallpaperImageV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
} }
return cell return cell
} }
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) { func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
let vc = WP_WallPaPerDetailsVC()
vc.type = 1
vc.model = self.wallpapers[index]
self.navigationController?.pushViewController(vc, animated: true)
} }
} }

View File

@ -27,7 +27,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="40V-Ys-a57" customClass="FSPagerView" customModule="FSPagerView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="40V-Ys-a57" customClass="FSPagerView" customModule="FSPagerView">
<rect key="frame" x="0.0" y="96.666666666666686" width="393" height="721.33333333333326"/> <rect key="frame" x="0.0" y="126.66666666666669" width="393" height="651.33333333333326"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe left and right to view more" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="14c-Ps-Ttk"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe left and right to view more" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="14c-Ps-Ttk">
@ -44,9 +44,9 @@
<constraint firstItem="54V-al-OWg" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="GvR-OB-fNq"/> <constraint firstItem="54V-al-OWg" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="GvR-OB-fNq"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="40V-Ys-a57" secondAttribute="trailing" id="KbK-PJ-p3n"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="40V-Ys-a57" secondAttribute="trailing" id="KbK-PJ-p3n"/>
<constraint firstItem="54V-al-OWg" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="Sgr-U8-0Vk"/> <constraint firstItem="54V-al-OWg" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="Sgr-U8-0Vk"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="40V-Ys-a57" secondAttribute="bottom" id="Tfl-ss-wce"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="40V-Ys-a57" secondAttribute="bottom" constant="40" id="Tfl-ss-wce"/>
<constraint firstItem="14c-Ps-Ttk" firstAttribute="bottom" secondItem="54V-al-OWg" secondAttribute="bottom" id="aNp-Te-BpS"/> <constraint firstItem="14c-Ps-Ttk" firstAttribute="bottom" secondItem="54V-al-OWg" secondAttribute="bottom" id="aNp-Te-BpS"/>
<constraint firstItem="40V-Ys-a57" firstAttribute="top" secondItem="54V-al-OWg" secondAttribute="bottom" constant="10" id="gyA-rV-VMM"/> <constraint firstItem="40V-Ys-a57" firstAttribute="top" secondItem="54V-al-OWg" secondAttribute="bottom" constant="40" id="gyA-rV-VMM"/>
<constraint firstItem="40V-Ys-a57" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="m4V-tk-m6O"/> <constraint firstItem="40V-Ys-a57" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="m4V-tk-m6O"/>
</constraints> </constraints>
<point key="canvasLocation" x="65" y="-11"/> <point key="canvasLocation" x="65" y="-11"/>

View File

@ -45,3 +45,48 @@ class WP_4KModel: NSObject,Decodable,Encodable {
} }
class WP_PhotoAlbum: NSObject,Codable {
var img:String?
init(img: String?) {
self.img = img
}
}
//
class PreferencesManager {
static let shared = PreferencesManager()
let defaults = UserDefaults.standard
//
func saveRakModels(_ models: [WP_PhotoAlbum]) {
do {
let encoder = JSONEncoder()
let encodedData = try encoder.encode(models)
defaults.set(encodedData, forKey: "rakModels")
} catch {
print("Error encoding rakModels: \(error)")
}
}
//
func addRakModel(_ model: WP_PhotoAlbum) {
var existingModels = retrieveRakModels() ?? [] // 使
existingModels.append(model) //
saveRakModels(existingModels) //
}
//
func retrieveRakModels() -> [WP_PhotoAlbum]? {
if let savedData = defaults.data(forKey: "rakModels") {
do {
let decoder = JSONDecoder()
let loadedModels = try decoder.decode([WP_PhotoAlbum].self, from: savedData)
return loadedModels
} catch {
print("Error decoding rakModels: \(error)")
return nil
}
}
return nil
}
}

View File

@ -0,0 +1,143 @@
//
// AccountManager.swift
// wallpaper_project
import Foundation
import UIKit
//
struct Account:Decodable,Encodable {
let username: String
let password: String
}
class AccountManager {
static let accountsKey = "Accounts"
static let currentAccountKey = "CurrentAccount"
static func getAccounts() -> [Account] {
guard let data = UserDefaults.standard.data(forKey: accountsKey) else {
return []
}
do {
let accounts = try JSONDecoder().decode([Account].self, from: data)
return accounts
} catch {
print("Error decoding accounts: \(error)")
return []
}
}
static func saveAccount(account: Account) {
var accounts = getAccounts()
accounts.append(account)
do {
let data = try JSONEncoder().encode(accounts)
UserDefaults.standard.set(data, forKey: accountsKey)
} catch {
print("Error encoding accounts: \(error)")
}
}
static func deleteAccount(at index: Int) {
var accounts = getAccounts()
accounts.remove(at: index)
do {
let data = try JSONEncoder().encode(accounts)
UserDefaults.standard.set(data, forKey: accountsKey)
} catch {
print("Error encoding accounts: \(error)")
}
}
static func updateAccount(at index: Int, with newAccount: Account) {
var accounts = getAccounts()
accounts[index] = newAccount
do {
let data = try JSONEncoder().encode(accounts)
UserDefaults.standard.set(data, forKey: accountsKey)
} catch {
print("Error encoding accounts: \(error)")
}
}
static func createDefaultAccountIfNeeded() {
if getAccounts().isEmpty {
let defaultAccount = Account(username: "13730645123", password: "123456")
saveAccount(account: defaultAccount)
}
}
static func validateAccount(username: String, password: String) -> Bool {
let accounts = getAccounts()
for account in accounts {
if account.username == username && account.password == password {
return true
}
}
return false
}
static var currentAccount: Account? {
get {
guard let data = UserDefaults.standard.data(forKey: currentAccountKey) else {
return nil
}
do {
let account = try JSONDecoder().decode(Account.self, from: data)
return account
} catch {
print("Error decoding current account: \(error)")
return nil
}
}
set {
guard let newValue = newValue else {
UserDefaults.standard.removeObject(forKey: currentAccountKey)
return
}
do {
let data = try JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: currentAccountKey)
} catch {
print("Error encoding current account: \(error)")
}
}
}
static func login(username: String, password: String) -> Bool {
let accounts = getAccounts()
for account in accounts {
if account.username == username && account.password == password {
currentAccount = account
return true
}
}
return false
}
static func logout() {
UserDefaults.standard.removeObject(forKey: currentAccountKey)
}
static func logoutSpecificAccount(username: String) {
var accounts = getAccounts()
if let index = accounts.firstIndex(where: { $0.username == username }) {
accounts.remove(at: index)
do {
let data = try JSONEncoder().encode(accounts)
UserDefaults.standard.set(data, forKey: accountsKey)
} catch {
print("Error encoding accounts: \(error)")
}
} else {
print("Account not found")
}
}
}

View File

@ -0,0 +1,35 @@
//
// PrefixHeader.swift
// wallpaper_project
import Foundation
import UIKit
//
let Screen_Width = UIScreen.main.bounds.width
let Screen_height = UIScreen.main.bounds.height
let KScaleW = UIScreen.main.bounds.width/320.0
let KScaleH = UIScreen.main.bounds.height/568.0
var isFullScreen: Bool {
if #available(iOS 11, *) {
guard let w = UIApplication.shared.delegate?.window, let unwrapedWindow = w else {
return false
}
if unwrapedWindow.safeAreaInsets.left > 0 || unwrapedWindow.safeAreaInsets.bottom > 0 {
print(unwrapedWindow.safeAreaInsets)
return true
}
}
return false
}
var kSafeArea_Top: CGFloat {
return isFullScreen ? 44 : 20
}
var kSafeArea_Bottom: CGFloat {
return isFullScreen ? 34 : 0
}

View File

@ -0,0 +1,169 @@
//
// SPayPassWordView.swift
// SPayPasswordView
//
// Created by sss on 2017/4/21.
// Copyright © 2017 sss. All rights reserved.
//
import UIKit
protocol SPayPassWordViewDelegate : NSObjectProtocol{
func entryComplete(password:String)
}
@IBDesignable class SPayPassWordView: UIView {
@IBInspectable var lenght:Int = 6 {
didSet{
updataUI()
}
}
@IBInspectable var star: String = ""
@IBInspectable var starColor: UIColor = UIColor.cyan {
didSet {
squareArray.forEach { (label) in
label.textColor = starColor
}
}
}
@IBInspectable var borderColor: UIColor = UIColor.black {
didSet {
squareArray.forEach { (label) in
label.layer.borderColor = borderColor.cgColor
}
}
}
@IBInspectable var borderWidth: CGFloat = 1 {
didSet {
squareArray.forEach { (label) in
label.layer.borderWidth = borderWidth
label.layer.masksToBounds = borderWidth > 0
}
}
}
@IBInspectable var borderRadius: CGFloat = 0 {
didSet{
squareArray.forEach { (label) in
label.layer.cornerRadius = borderRadius
}
}
}
var side: CGFloat!
var password: String = ""
var squareArray = [UILabel]()
var space: CGFloat!
var textField: UITextField = UITextField()
var tempArrat = [String]()
override init(frame: CGRect) {
super.init(frame: frame)
updataUI()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
updataUI()
}
weak var delegate: SPayPassWordViewDelegate?
func updataUI(){
for view in self.subviews{
view.removeFromSuperview()
}
side = self.frame.height
space = (self.frame.width - (CGFloat(lenght) * side)) / CGFloat(lenght - 1)
for index in 0..<lenght{
let label = UILabel(frame: CGRect(x: (space + side) * CGFloat(index), y: 0, width: side, height: side))
label.layer.masksToBounds = true
label.textAlignment = .center
label.layer.borderColor = UIColor.gray.cgColor
label.layer.borderWidth = 1
squareArray.append(label)
}
for square in squareArray {
self.addSubview(square)
}
textField.keyboardType = .numberPad
textField.delegate = self
self.addSubview(textField)
}
func input() {
textField.becomeFirstResponder()
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
textField.becomeFirstResponder()
}
deinit {
self.delegate = nil
}
}
extension SPayPassWordView:UITextFieldDelegate{
func textFieldDidBeginEditing(_ textField: UITextField) {
textField.text = ""
password = ""
squareArray.forEach { (label) in
label.text = ""
}
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
///
if string == "" {
if password == ""{///
return true
}else if password.count == 1{
password = ""
}else{
password = String(password[..<password.index(password.endIndex, offsetBy: -1)])
}
}else{
password += string
}
///
for index in 0..<squareArray.count{
if index < password.count {
squareArray[index].text = ""
}else{
squareArray[index].text = ""
}
}
///
if password.count >= lenght {
textField.resignFirstResponder()
textField.text = password
self.delegate?.entryComplete(password: password)
self.endEditing(true)
return false
}
return true
}
}

View File

@ -0,0 +1,214 @@
//
// historyManager.swift
// wallpaper_project
import Foundation
class HistoryManager {
static let shared = HistoryManager()
private let historyKey = "com.example.app.history"
//
var history: [WP_4KModel] {
get {
if let data = UserDefaults.standard.data(forKey: historyKey),
let history = try? JSONDecoder().decode([WP_4KModel].self, from: data) {
return history
}
return []
}
set {
let data = try? JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: historyKey)
}
}
//
func addHistoryItem(item: WP_4KModel) {
//
if history.contains(where: { $0.title == item.title }) {
return
}
var updatedHistory = history
updatedHistory.append(item)
history = updatedHistory
}
//
func clearHistory() {
UserDefaults.standard.removeObject(forKey: historyKey)
}
}
class liveManager {
static let shared = liveManager()
private let historyKey = "com.example.app.live"
//
var history: [WP_4KModel] {
get {
if let data = UserDefaults.standard.data(forKey: historyKey),
let history = try? JSONDecoder().decode([WP_4KModel].self, from: data) {
return history
}
return []
}
set {
let data = try? JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: historyKey)
}
}
//
func addHistoryItem(item: WP_4KModel) {
//
if history.contains(where: { $0.title == item.title }) {
return
}
var updatedHistory = history
updatedHistory.append(item)
history = updatedHistory
}
//
func clearHistory() {
UserDefaults.standard.removeObject(forKey: historyKey)
}
}
class HistoryjpgManager {
static let shared = HistoryjpgManager()
private let historyKey = "com.example.app.jpg"
//
var history: [WallpaperData] {
get {
if let data = UserDefaults.standard.data(forKey: historyKey),
let history = try? JSONDecoder().decode([WallpaperData].self, from: data) {
return history
}
return []
}
set {
let data = try? JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: historyKey)
}
}
//
func addHistoryItem(item: WallpaperData) {
//
if history.contains(where: { $0.previewThumb == item.previewThumb }) {
return
}
var updatedHistory = history
updatedHistory.append(item)
history = updatedHistory
}
//
func clearHistory() {
UserDefaults.standard.removeObject(forKey: historyKey)
}
}
class scjpgManager {
static let shared = scjpgManager()
private let historyKey = "com.example.app.scjpg"
//
var history: [WallpaperData] {
get {
if let data = UserDefaults.standard.data(forKey: historyKey),
let history = try? JSONDecoder().decode([WallpaperData].self, from: data) {
return history
}
return []
}
set {
let data = try? JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: historyKey)
}
}
//
func addHistoryItem(item: WallpaperData) {
//
if history.contains(where: { $0.previewThumb == item.previewThumb }) {
return
}
var updatedHistory = history
updatedHistory.append(item)
history = updatedHistory
}
//
func clearHistory() {
UserDefaults.standard.removeObject(forKey: historyKey)
}
}
class sc4kManager {
static let shared = sc4kManager()
private let historyKey = "com.example.app.sc4k"
//
var history: [WP_4KModel] {
get {
if let data = UserDefaults.standard.data(forKey: historyKey),
let history = try? JSONDecoder().decode([WP_4KModel].self, from: data) {
return history
}
return []
}
set {
let data = try? JSONEncoder().encode(newValue)
UserDefaults.standard.set(data, forKey: historyKey)
}
}
//
func addHistoryItem(item: WP_4KModel) {
//
if history.contains(where: { $0.title == item.title }) {
return
}
var updatedHistory = history
updatedHistory.append(item)
history = updatedHistory
}
//
func clearHistory() {
UserDefaults.standard.removeObject(forKey: historyKey)
}
}
//
func setLoggedIn(_ value: Bool) {
UserDefaults.standard.set(value, forKey: "isLoggedIn")
}
///
func isLoggedIn() -> Bool {
if UserDefaults.standard.object(forKey: "isLoggedIn") != nil {
return UserDefaults.standard.bool(forKey: "isLoggedIn")
} else {
//
return false
}
}
//func issave(_ value: Bool) {
// UserDefaults.standard.set(value, forKey: "issave")
//}
//
//func issure(_ value: Bool) {
// UserDefaults.standard.set(value, forKey: "issure")
//}