diff --git a/Etymo/Assets.xcassets/Symbols/Contents.json b/Etymo/Assets.xcassets/Symbols/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Etymo/Assets.xcassets/Symbols/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/Contents.json b/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/Contents.json new file mode 100644 index 0000000..31a31db --- /dev/null +++ b/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "text.page.badge.magnifyingglass.svg", + "idiom" : "universal" + } + ] +} diff --git a/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/text.page.badge.magnifyingglass.svg b/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/text.page.badge.magnifyingglass.svg new file mode 100644 index 0000000..a3e5b8e --- /dev/null +++ b/Etymo/Assets.xcassets/Symbols/text.page.badge.magnifyingglass.symbolset/text.page.badge.magnifyingglass.svg @@ -0,0 +1,125 @@ + + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.5.0 + Requires Xcode 15 or greater + Generated from text.page.badge.magnifyingglass + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/Contents.json b/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/Contents.json new file mode 100644 index 0000000..d11e618 --- /dev/null +++ b/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "wifi.slash.svg", + "idiom" : "universal" + } + ] +} diff --git a/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/wifi.slash.svg b/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/wifi.slash.svg new file mode 100644 index 0000000..da7411f --- /dev/null +++ b/Etymo/Assets.xcassets/Symbols/wifi.slash.symbolset/wifi.slash.svg @@ -0,0 +1,125 @@ + + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.5.0 + Requires Xcode 15 or greater + Generated from wifi.slash + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Etymo/ContentUnavailableView.swift b/Etymo/ContentUnavailableView.swift index 013d369..ca7b4b9 100644 --- a/Etymo/ContentUnavailableView.swift +++ b/Etymo/ContentUnavailableView.swift @@ -28,7 +28,7 @@ struct ContentUnavailableView: View { #Preview { ContentUnavailableView( - image: Image(systemName: "wifi.slash"), + image: Image(.wifiSlash), title: "Not Connected", description: "Unable to lookup words while offline.\nCheck your Internet connection." ) diff --git a/Etymo/ContentView.swift b/Etymo/ContentView.swift index fd4d1d0..fe70daa 100644 --- a/Etymo/ContentView.swift +++ b/Etymo/ContentView.swift @@ -27,7 +27,6 @@ struct ContentView: View { .frame(width: geometry.size.width) .frame(minHeight: geometry.size.height) } - .navigationTitle("Etymo") .searchable(text: $viewModel.searchText, prompt: "Word") } @@ -44,7 +43,7 @@ struct ContentView: View { var emptySearchView: some View { ContentUnavailableView( - image: Image(systemName: "text.page.badge.magnifyingglass"), + image: Image(.textPageBadgeMagnifyingglass), title: "Enter a Word", description: "Type a word into the search to see its definitions." ) @@ -53,7 +52,7 @@ struct ContentView: View { var noResultsView: some View { ContentUnavailableView( - image: Image(systemName: "text.page.badge.magnifyingglass"), + image: Image(.textPageBadgeMagnifyingglass), title: "No Results", description: "Check the spelling or try a new search." ) @@ -62,7 +61,7 @@ struct ContentView: View { var notConnectedView: some View { ContentUnavailableView( - image: Image(systemName: "wifi.slash"), + image: Image(.wifiSlash), title: "Not Connected", description: "Unable to lookup words while offline.\nCheck your Internet connection." ) diff --git a/README.md b/README.md index 7a5a81b..ba2c6ad 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,20 @@ Explore words like never before with definitions, origins, usage, and more in on Open `Etymo.xcodeproj` and build/run the project. +### Images + +Convert all icons to [symbols](https://developer.apple.com/documentation/uikit/uiimage/creating_custom_symbol_images_for_your_app) and store them in `Assets.xcassets/Symbols`. Export symbols from [SF Symbols](https://developer.apple.com/sf-symbols/) or use [SF Symbol Creator](https://www.figma.com/community/plugin/1207724751253683840) to export custom icons from Figma. + +Use compiled assets instead of string named images: + +``` +// Incorrect +Image("star") + +// Correct +Image(.star) +``` + ### Device Support Support is provided for the most current version and the previous version of iOS and iPadOS, as well as for earlier versions until their usage falls below 10%. For the latest statistics, see [iOS and iPadOS Usage](https://developer.apple.com/support/app-store/).