Fix alternate app icons
This commit is contained in:
parent
03e5a960d2
commit
aef4d86853
|
@ -6,11 +6,21 @@ struct IconSelectorView: View {
|
|||
self.rawValue
|
||||
}
|
||||
|
||||
case primary = "AppIconInApp"
|
||||
case primary = "AppIcon"
|
||||
case alternate1 = "AppIconAlternate1"
|
||||
case alternate2 = "AppIconAlternate2"
|
||||
case alternate3 = "AppIconAlternate3"
|
||||
case alternate4 = "AppIconAlternate4"
|
||||
|
||||
var iconName: String {
|
||||
switch self {
|
||||
case .primary: return "icon0"
|
||||
case .alternate1: return "icon1"
|
||||
case .alternate2: return "icon2"
|
||||
case .alternate3: return "icon3"
|
||||
case .alternate4: return "icon4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@State private var currentIcon = UIApplication.shared.alternateIconName ?? Icon.primary.rawValue
|
||||
|
@ -31,7 +41,7 @@ struct IconSelectorView: View {
|
|||
}
|
||||
} label: {
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
Image(uiImage: .init(named: icon.rawValue) ?? .init())
|
||||
Image(uiImage: .init(named: icon.iconName) ?? .init())
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(minHeight: 125, maxHeight: 1024)
|
||||
|
|
|
@ -96,10 +96,12 @@ struct SettingsTabs: View {
|
|||
Label {
|
||||
Text("Icon selector")
|
||||
} icon: {
|
||||
Image(uiImage: .init(named: UIApplication.shared.alternateIconName ?? "AppIconInApp")!)
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.cornerRadius(4)
|
||||
if let icon = IconSelectorView.Icon(rawValue: UIApplication.shared.alternateIconName ?? "AppIcon") {
|
||||
Image(uiImage: .init(named: icon.iconName)!)
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.cornerRadius(4)
|
||||
}
|
||||
}
|
||||
}
|
||||
Link(destination: URL(string: "https://github.com/Dimillian/IceCubesApp")!) {
|
||||
|
|
Before Width: | Height: | Size: 986 KiB After Width: | Height: | Size: 986 KiB |
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon.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.5 MiB |
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon.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.3 MiB |
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon.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: 1016 KiB |
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon.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.5 MiB |
Loading…
Reference in New Issue