Skip to content

Commit

Permalink
fix: Add iOS icon grid (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmorley authored Jan 4, 2023
1 parent 0c03de8 commit 7115342
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Symbolic/Assets.xcassets/Grid_iOS.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "App Icon Grid - App Store.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
13 changes: 9 additions & 4 deletions Symbolic/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ struct ContentView: View {
ZStack {
MacIconView(icon: document.icon, size: 512, isShadowFlipped: false)
if showGrid {
Image("AppIconGrid")
Image("Grid_macOS")
}
}
.frame(width: 512, height: 512)
case .iOS:
IconView(icon: document.icon, size: 512, renderShadow: false)
.modifier(IconCorners(size: 512))
ZStack {
IconView(icon: document.icon, size: 512, renderShadow: false)
.modifier(IconCorners(size: 512))
if showGrid {
Image("Grid_iOS")
}
}
case .watchOS:
IconView(icon: document.icon, size: 512, renderShadow: false)
.clipShape(Circle())
Expand Down Expand Up @@ -78,7 +83,7 @@ struct ContentView: View {
.toolbar(id: "main") {
ToolbarItem(id: "grid") {
Toggle(isOn: $showGrid) {
Label("Toggle Grid", systemImage: "grid")
Label("Grid", systemImage: "grid")
}
.help("Hide/show the icon grid")
}
Expand Down

0 comments on commit 7115342

Please sign in to comment.