Update
@ -11,18 +11,6 @@
|
|||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "appLogo-20@3x.png",
|
"filename" : "appLogo-20@3x.png",
|
||||||
"scale" : "3x"
|
"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",
|
"size" : "29x29",
|
||||||
@ -60,6 +48,18 @@
|
|||||||
"filename" : "appLogo-60@3x.png",
|
"filename" : "appLogo-60@3x.png",
|
||||||
"scale" : "3x"
|
"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",
|
"size" : "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@ -1486,6 +1486,22 @@ And that’s all you need to know to follow the vibe!</string>
|
|||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<state key="normal" title="DO NOT PRESS"/>
|
<state key="normal" title="DO NOT PRESS"/>
|
||||||
</button>
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YeQ-WQ-n1K">
|
||||||
|
<rect key="frame" x="89" y="215" width="33" height="30"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<state key="normal" title="Dark"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="darkBtnPressed:" destination="FXb-No-u4u" eventType="touchUpInside" id="20Q-Y4-vVN"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IyG-gq-Bc5">
|
||||||
|
<rect key="frame" x="191" y="215" width="35" height="30"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<state key="normal" title="Light"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="lightBtnPresssed:" destination="FXb-No-u4u" eventType="touchUpInside" id="4bu-yi-N7Q"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<viewLayoutGuide key="safeArea" id="3YM-pK-9CO"/>
|
<viewLayoutGuide key="safeArea" id="3YM-pK-9CO"/>
|
||||||
|
|||||||
@ -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) {
|
@IBAction func easterBtnPressed(_ sender: Any) {
|
||||||
UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .green})
|
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")
|
// defaults.set(0, forKey: "setupDone")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||