diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/Contents.json b/Guibe/Assets.xcassets/AppIcon.appiconset/Contents.json
index af9d54c..d5ca7bc 100644
--- a/Guibe/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/Guibe/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,28 +1,16 @@
{
"images" : [
- {
+ {
"size" : "20x20",
- "idiom": "iphone",
- "filename" : "appLogo-20@2x.png",
- "scale": "2x"
- },
- {
- "size" : "20x20",
- "idiom": "iphone",
- "filename" : "appLogo-20@3x.png",
- "scale": "3x"
- },
- {
- "size" : "20x20",
- "idiom": "ipad",
- "filename" : "appLogo-20.png",
- "scale": "1x"
+ "idiom" : "iphone",
+ "filename" : "appLogo-20@2x.png",
+ "scale" : "2x"
},
{
"size" : "20x20",
- "idiom": "ipad",
- "filename" : "appLogo-20@2x.png",
- "scale": "2x"
+ "idiom" : "iphone",
+ "filename" : "appLogo-20@3x.png",
+ "scale" : "3x"
},
{
"size" : "29x29",
@@ -60,6 +48,18 @@
"filename" : "appLogo-60@3x.png",
"scale" : "3x"
},
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "appLogo-20.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "appLogo-20@2x.png",
+ "scale" : "2x"
+ },
{
"size" : "29x29",
"idiom" : "ipad",
@@ -113,4 +113,4 @@
"version" : 1,
"author" : "xcode"
}
-}
+}
\ No newline at end of file
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-1024.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-1024.png
deleted file mode 100644
index 1a5a4eb..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-1024.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20.png
deleted file mode 100644
index b2648f6..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@2x.png
deleted file mode 100644
index 7ecf038..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@3x.png
deleted file mode 100644
index 0d1e2a4..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-20@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29.png
deleted file mode 100644
index 210cbaf..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@2x.png
deleted file mode 100644
index f57c723..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@3x.png
deleted file mode 100644
index a43d55c..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-29@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40.png
deleted file mode 100644
index 7ecf038..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@2x.png
deleted file mode 100644
index 52de218..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@3x.png
deleted file mode 100644
index de1c601..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-40@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@2x.png
deleted file mode 100644
index de1c601..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@3x.png
deleted file mode 100644
index f239f80..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-60@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76.png
deleted file mode 100644
index b47cf5c..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76@2x.png
deleted file mode 100644
index 5f2c8f4..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-76@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-83.5@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-83.5@2x.png
deleted file mode 100644
index 53bf69e..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/logo_mpt-83.5@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-1024.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-1024.png
deleted file mode 100644
index 7a0189d..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-1024.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20.png
deleted file mode 100644
index 47c553a..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@2x.png
deleted file mode 100644
index 40d6ff8..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@3x.png
deleted file mode 100644
index 55bc008..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-20@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29.png
deleted file mode 100644
index d6ab8b3..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@2x.png
deleted file mode 100644
index 17c0363..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@3x.png
deleted file mode 100644
index e7f5066..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-29@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40.png
deleted file mode 100644
index 40d6ff8..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@2x.png
deleted file mode 100644
index ecfb9d1..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@3x.png
deleted file mode 100644
index 8431a16..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-40@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@2x.png
deleted file mode 100644
index 8431a16..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@3x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@3x.png
deleted file mode 100644
index 8243399..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-60@3x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76.png
deleted file mode 100644
index 3f960c6..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76@2x.png
deleted file mode 100644
index ceee1d8..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-76@2x.png and /dev/null differ
diff --git a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-83.5@2x.png b/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-83.5@2x.png
deleted file mode 100644
index fd89054..0000000
Binary files a/Guibe/Assets.xcassets/AppIcon.appiconset/menuBtnImg-83.5@2x.png and /dev/null differ
diff --git a/Guibe/Base.lproj/Main.storyboard b/Guibe/Base.lproj/Main.storyboard
index 28a1eb0..8478f5e 100644
--- a/Guibe/Base.lproj/Main.storyboard
+++ b/Guibe/Base.lproj/Main.storyboard
@@ -1486,6 +1486,22 @@ And that’s all you need to know to follow the vibe!
+
+
diff --git a/Guibe/SecretsViewController.swift b/Guibe/SecretsViewController.swift
index f31d5de..66d6983 100644
--- a/Guibe/SecretsViewController.swift
+++ b/Guibe/SecretsViewController.swift
@@ -37,6 +37,29 @@ class SecretsViewController: UIViewController {
}
+ @IBAction func darkBtnPressed(_ sender: Any) {
+ if UIApplication.shared.supportsAlternateIcons {
+ if let alternateIconName = UIApplication.shared.alternateIconName {
+ print("current icon is \(alternateIconName), change to primary icon")
+ UIApplication.shared.setAlternateIconName(nil)
+ } else {
+ print("current icon is primary icon, change to alternative icon")
+ UIApplication.shared.setAlternateIconName("ad"){ error in
+ if let error = error {
+ print(error.localizedDescription)
+ } else {
+ print("Done!")
+ }
+ }
+ }
+ }
+ }
+
+
+ @IBAction func lightBtnPresssed(_ sender: Any) {
+ changeIcon(to: "appLogo-60")
+ }
+
@IBAction func easterBtnPressed(_ sender: Any) {
UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .green})
@@ -71,6 +94,24 @@ class SecretsViewController: UIViewController {
}
+
+ func changeIcon(to iconName: String) {
+ // 1
+ guard UIApplication.shared.supportsAlternateIcons else {
+ return
+ }
+
+ // 2
+ UIApplication.shared.setAlternateIconName(iconName, completionHandler: { (error) in
+ // 3
+ if let error = error {
+ print("App icon failed to change due to \(error.localizedDescription)")
+ } else {
+ print("App icon changed successfully")
+ }
+ })
+ }
+
// defaults.set(0, forKey: "setupDone")
}