diff --git a/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index ffdfe15..0000000 --- a/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "tinted" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Resources/Assets.xcassets/StickerSlack.appiconset/Contents.json b/Resources/Assets.xcassets/StickerSlack.appiconset/Contents.json new file mode 100644 index 0000000..cde4b46 --- /dev/null +++ b/Resources/Assets.xcassets/StickerSlack.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "filename" : "StickerSlack-iOS-Default-1024x1024@1x.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "StickerSlack-iOS-Dark-1024x1024@1x.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "filename" : "StickerSlack-iOS-Default-1024x1024@1x 1.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Resources/Assets.xcassets/icon-dark.imageset/StickerSlack-iOS-Dark-1024x1024@1x.png b/Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Dark-1024x1024@1x.png similarity index 100% rename from Resources/Assets.xcassets/icon-dark.imageset/StickerSlack-iOS-Dark-1024x1024@1x.png rename to Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Dark-1024x1024@1x.png diff --git a/Resources/Assets.xcassets/StickerSlack.imageset/StickerSlack-iOS-Default-1024x1024@1x.png b/Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Default-1024x1024@1x 1.png similarity index 100% rename from Resources/Assets.xcassets/StickerSlack.imageset/StickerSlack-iOS-Default-1024x1024@1x.png rename to Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Default-1024x1024@1x 1.png diff --git a/Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Default-1024x1024@1x.png b/Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Default-1024x1024@1x.png new file mode 100644 index 0000000..be357d6 Binary files /dev/null and b/Resources/Assets.xcassets/StickerSlack.appiconset/StickerSlack-iOS-Default-1024x1024@1x.png differ diff --git a/Resources/Assets.xcassets/StickerSlack.imageset/Contents.json b/Resources/Assets.xcassets/StickerSlack.imageset/Contents.json deleted file mode 100644 index 3346991..0000000 --- a/Resources/Assets.xcassets/StickerSlack.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "StickerSlack-iOS-Default-1024x1024@1x.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Resources/Assets.xcassets/icon-dark.imageset/Contents.json b/Resources/Assets.xcassets/icon-dark.imageset/Contents.json deleted file mode 100644 index 9bbf745..0000000 --- a/Resources/Assets.xcassets/icon-dark.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "StickerSlack-iOS-Dark-1024x1024@1x.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Resources/Assets.xcassets/icon.imageset/Contents.json b/Resources/Assets.xcassets/icon.imageset/Contents.json index 3346991..69f7778 100644 --- a/Resources/Assets.xcassets/icon.imageset/Contents.json +++ b/Resources/Assets.xcassets/icon.imageset/Contents.json @@ -5,11 +5,42 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "StickerSlack-iOS-Dark-1024x1024@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", "scale" : "3x" } diff --git a/Resources/Assets.xcassets/icon.imageset/StickerSlack-iOS-Dark-1024x1024@1x.png b/Resources/Assets.xcassets/icon.imageset/StickerSlack-iOS-Dark-1024x1024@1x.png new file mode 100644 index 0000000..93e2853 Binary files /dev/null and b/Resources/Assets.xcassets/icon.imageset/StickerSlack-iOS-Dark-1024x1024@1x.png differ diff --git a/Resources/Icon.pxd b/Resources/Icon.pxd index 86970d6..84e7bdb 100644 Binary files a/Resources/Icon.pxd and b/Resources/Icon.pxd differ diff --git a/StickerSlack.xcodeproj/project.pbxproj b/StickerSlack.xcodeproj/project.pbxproj index d8d53a9..b596196 100644 --- a/StickerSlack.xcodeproj/project.pbxproj +++ b/StickerSlack.xcodeproj/project.pbxproj @@ -75,6 +75,8 @@ A99589B12F5E0D83003A4A8C /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = A99589AE2F5E0D83003A4A8C /* image.png */; }; A995D95B2F6EBBDD0043E5F5 /* TestStructures.swift in Sources */ = {isa = PBXBuildFile; fileRef = A995D95A2F6EBBDD0043E5F5 /* TestStructures.swift */; }; A995D95C2F6EBBDD0043E5F5 /* TestStructures.swift in Sources */ = {isa = PBXBuildFile; fileRef = A995D95A2F6EBBDD0043E5F5 /* TestStructures.swift */; }; + A99C4B8D2FF2E8D30070CBA5 /* TabbedContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A94693D62FEF0A4200E56AC5 /* TabbedContentView.swift */; }; + A99C4B8E2FF2E8D30070CBA5 /* TabbedContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A94693D62FEF0A4200E56AC5 /* TabbedContentView.swift */; }; A9A7A43F2F6835F800BB84C6 /* Trending.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A7A43E2F6835F800BB84C6 /* Trending.swift */; }; A9A7A4402F6835F800BB84C6 /* Trending.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A7A43E2F6835F800BB84C6 /* Trending.swift */; }; A9A7A4422F68360200BB84C6 /* GifObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A7A4412F68360200BB84C6 /* GifObject.swift */; }; @@ -733,6 +735,7 @@ A9C52F752F89A93D00078588 /* URL.swift in Sources */, A9CD6C352EDDE22800B7F421 /* EmojiPackDetailView.swift in Sources */, A9F7B3812F8951210071F198 /* EmojiPackImporterView.swift in Sources */, + A99C4B8D2FF2E8D30070CBA5 /* TabbedContentView.swift in Sources */, A9A7A44E2F68383900BB84C6 /* GiphyImages.swift in Sources */, A9C172DD2EB8C9AC008A7885 /* Trie.swift in Sources */, A955B3F22EC22E9700E1732D /* BrowseView.swift in Sources */, @@ -801,6 +804,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A99C4B8E2FF2E8D30070CBA5 /* TabbedContentView.swift in Sources */, A9A7A4462F68360900BB84C6 /* Pagination.swift in Sources */, A957C17C2ECE542D00EA3EE9 /* GifManager.swift in Sources */, A9104C7F2EB4022500D160EA /* MSSticker.swift in Sources */, diff --git a/StickerSlack/SwiftUI/SettingsView.swift b/StickerSlack/SwiftUI/SettingsView.swift index a3df0b3..76a9b44 100644 --- a/StickerSlack/SwiftUI/SettingsView.swift +++ b/StickerSlack/SwiftUI/SettingsView.swift @@ -20,7 +20,7 @@ struct SettingsView: View { List { Section { HStack { - Image(isDark ? "icon-dark" : "icon") + Image("icon") .resizable().scaledToFit() .frame(width: 100, height: 100) .clipShape(RoundedRectangle(cornerRadius: 24)) diff --git a/StickerSlack/SwiftUI/WelcomeView.swift b/StickerSlack/SwiftUI/WelcomeView.swift index db50b58..e1cbbcf 100644 --- a/StickerSlack/SwiftUI/WelcomeView.swift +++ b/StickerSlack/SwiftUI/WelcomeView.swift @@ -17,7 +17,7 @@ struct WelcomeView: View { var body: some View { VStack(spacing: 0) { HStack { - Image("icon\(isDark ? "-dark" : "")") + Image("icon") .resizable().scaledToFit() .frame(maxWidth: 75) Spacer() @@ -52,7 +52,7 @@ struct WelcomeView: View { } label: { ContinueButtonView() } - .buttonStyle(.glassProminent) + .modifier(glassButtonIfAv()) } else { Button() { dismiss() diff --git a/StickerSlack/UIKit/TabbedContentView.swift b/StickerSlack/UIKit/TabbedContentView.swift index 6d2539e..09dbfb7 100644 --- a/StickerSlack/UIKit/TabbedContentView.swift +++ b/StickerSlack/UIKit/TabbedContentView.swift @@ -7,5 +7,42 @@ import Foundation import UIKit +import SwiftUI +final class TabbedContentView: UITabBarController { + override func viewDidLoad() { + super.viewDidLoad() + setupTabs() + } + + private func setupTabs() { + let emojiHoarder = EmojiHoarder() + let gifHoarder = GifHoarder() + + let browseView = BrowseView(emojiHoarder: emojiHoarder, gifHoarder: gifHoarder) + let browse = UIHostingController(rootView: browseView) + browse.tabBarItem = UITabBarItem(title: "Home", image: UIImage(systemName: "house"), tag: 0) + + let packsView = EmojiPackManager(hoarder: emojiHoarder) + let packs = UIHostingController(rootView: packsView) + packs.tabBarItem = UITabBarItem(title: "Packs", image: UIImage(systemName: "house"), tag: 1) + + let downloadedView = DownloadedView(emojiHoarder: emojiHoarder, gifHoarder: gifHoarder) + let downloaded = UIHostingController(rootView: downloadedView) + downloaded.tabBarItem = UITabBarItem(title: "Downloaded", image: UIImage(systemName: "house"), tag: 2) + + let settingsView = SettingsView(hoarder: emojiHoarder) + let settings = UIHostingController(rootView: settingsView) + settings.tabBarItem = UITabBarItem(title: "Home", image: UIImage(systemName: "house"), tag: 3) + + self.setViewControllers([browse], animated: true) + selectedIndex = 0 + + } +} +@available(iOS 17, *) +#Preview { + let view2 = TabbedContentView() + return view2.view +}