diff --git a/Resources/Assets.xcassets/1-browseOrSearch.imageset/BrowseOrSearch.png b/Resources/Assets.xcassets/1-browseOrSearch.imageset/BrowseOrSearch.png new file mode 100644 index 0000000..365dccc Binary files /dev/null and b/Resources/Assets.xcassets/1-browseOrSearch.imageset/BrowseOrSearch.png differ diff --git a/Resources/Assets.xcassets/1-browseOrSearch.imageset/Contents.json b/Resources/Assets.xcassets/1-browseOrSearch.imageset/Contents.json new file mode 100644 index 0000000..7adf589 --- /dev/null +++ b/Resources/Assets.xcassets/1-browseOrSearch.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "BrowseOrSearch.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Resources/Assets.xcassets/StickersIcon.imageset/Contents.json b/Resources/Assets.xcassets/StickersIcon.imageset/Contents.json new file mode 100644 index 0000000..20d08d1 --- /dev/null +++ b/Resources/Assets.xcassets/StickersIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "StickersIcon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Resources/Assets.xcassets/StickersIcon.imageset/StickersIcon.png b/Resources/Assets.xcassets/StickersIcon.imageset/StickersIcon.png new file mode 100644 index 0000000..682e5f1 Binary files /dev/null and b/Resources/Assets.xcassets/StickersIcon.imageset/StickersIcon.png differ diff --git a/Resources/Assets.xcassets/iMessageAppIcon.imageset/Contents.json b/Resources/Assets.xcassets/iMessageAppIcon.imageset/Contents.json new file mode 100644 index 0000000..1c90f00 --- /dev/null +++ b/Resources/Assets.xcassets/iMessageAppIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "rectIcon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Resources/Assets.xcassets/iMessageAppIcon.imageset/rectIcon.png b/Resources/Assets.xcassets/iMessageAppIcon.imageset/rectIcon.png new file mode 100644 index 0000000..ae39e11 Binary files /dev/null and b/Resources/Assets.xcassets/iMessageAppIcon.imageset/rectIcon.png differ diff --git a/Resources/StickerSlack.icon/icon.json b/Resources/StickerSlack.icon/icon.json index ebca9a9..199b0c7 100644 --- a/Resources/StickerSlack.icon/icon.json +++ b/Resources/StickerSlack.icon/icon.json @@ -23,7 +23,13 @@ } }, { - "glass" : true, + "blend-mode-specializations" : [ + { + "appearance" : "dark", + "value" : "normal" + } + ], + "glass" : false, "image-name" : "Group 7.png", "name" : "Group 7", "position" : { @@ -35,6 +41,7 @@ } }, { + "glass" : true, "image-name" : "Group 8.png", "name" : "Group 8", "position" : { diff --git a/Resources/StickersIcon.pxd b/Resources/StickersIcon.pxd new file mode 100644 index 0000000..472cdc4 Binary files /dev/null and b/Resources/StickersIcon.pxd differ diff --git a/StickerSlack.xcodeproj/project.pbxproj b/StickerSlack.xcodeproj/project.pbxproj index 67b3fa4..9e6b08a 100644 --- a/StickerSlack.xcodeproj/project.pbxproj +++ b/StickerSlack.xcodeproj/project.pbxproj @@ -20,8 +20,6 @@ A917BAD22F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A917BAD02F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift */; }; A921C2DF2ED067BB00E57B1A /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A921C2DE2ED067BB00E57B1A /* WelcomeView.swift */; }; A921C2E02ED067BB00E57B1A /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A921C2DE2ED067BB00E57B1A /* WelcomeView.swift */; }; - A921C2E22ED071C900E57B1A /* ListRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A921C2E12ED071C900E57B1A /* ListRow.swift */; }; - A921C2E32ED071C900E57B1A /* ListRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A921C2E12ED071C900E57B1A /* ListRow.swift */; }; A924C3732EA9127200F20781 /* Emoji.swift in Sources */ = {isa = PBXBuildFile; fileRef = A924C3712EA9127200F20781 /* Emoji.swift */; }; A924C3782EA9225800F20781 /* Haptics in Frameworks */ = {isa = PBXBuildFile; productRef = A924C3772EA9225800F20781 /* Haptics */; }; A935437B2EB2A3C800BB80A4 /* FilterCategory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A935437A2EB2A3C800BB80A4 /* FilterCategory.swift */; }; @@ -200,7 +198,6 @@ A917BACD2F9B787B008DB31E /* EmojiCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiCollectionView.swift; sourceTree = ""; }; A917BAD02F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlainEmojiCollectionViewCell.swift; sourceTree = ""; }; A921C2DE2ED067BB00E57B1A /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = ""; }; - A921C2E12ED071C900E57B1A /* ListRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListRow.swift; sourceTree = ""; }; A924C3712EA9127200F20781 /* Emoji.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Emoji.swift; sourceTree = ""; }; A924C3742EA9134C00F20781 /* StickerSlack.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StickerSlack.entitlements; sourceTree = ""; }; A935437A2EB2A3C800BB80A4 /* FilterCategory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterCategory.swift; sourceTree = ""; }; @@ -549,7 +546,6 @@ children = ( A9BBC5172EB8FA4500FFE82F /* ViewModifiers.swift */, A9BDEADD2F82BC93002798DF /* NoStickersView.swift */, - A921C2E12ED071C900E57B1A /* ListRow.swift */, A9C52F6A2F8988CD00078588 /* EmptyCollectionView.swift */, ); path = Misc; @@ -628,7 +624,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 2600; + LastSwiftUpdateCheck = 2700; LastUpgradeCheck = 2600; TargetAttributes = { A949B1DE2EA04C0B00215164 = { @@ -749,7 +745,6 @@ A949B1F82EA04F2300215164 /* EmojiHoarder.swift in Sources */, A9BBC5182EB8FA4500FFE82F /* ViewModifiers.swift in Sources */, A9EB72492EB948C400658CEB /* StickerRow.swift in Sources */, - A921C2E22ED071C900E57B1A /* ListRow.swift in Sources */, A9773C2F2EA54AF000F3B753 /* StickerPreview.swift in Sources */, A9BE30F02F5B004800A57668 /* GifHoarder.swift in Sources */, A9BE30F22F5B004E00A57668 /* Gif.swift in Sources */, @@ -821,7 +816,6 @@ A9EC46AE2F6D9E5800E066E6 /* StickerType.swift in Sources */, A9B9A82F2EB2CCED004C9245 /* EmojiHoarder.swift in Sources */, A9CD6C3B2EDDE6B500B7F421 /* EmojiPack.swift in Sources */, - A921C2E32ED071C900E57B1A /* ListRow.swift in Sources */, A9BE30EF2F5B004800A57668 /* GifHoarder.swift in Sources */, A9A7A4492F68361200BB84C6 /* Meta.swift in Sources */, A9EB724A2EB948E000658CEB /* EmojiTableView.swift in Sources */, diff --git a/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerExtension.xcscheme b/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerExtension.xcscheme new file mode 100644 index 0000000..c5ddbe0 --- /dev/null +++ b/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerExtension.xcscheme @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerSlackiMessageApp.xcscheme b/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerSlackiMessageApp.xcscheme new file mode 100644 index 0000000..c198680 --- /dev/null +++ b/StickerSlack.xcodeproj/xcshareddata/xcschemes/StickerSlackiMessageApp.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StickerSlack/SwiftUI/ContentView.swift b/StickerSlack/SwiftUI/ContentView.swift index 1aa1be1..f8e6c8a 100644 --- a/StickerSlack/SwiftUI/ContentView.swift +++ b/StickerSlack/SwiftUI/ContentView.swift @@ -38,6 +38,13 @@ struct ContentView: View { } } } + .tabViewBottomAccessorySafe { + HStack { + Image(systemName: "magnifyingglass") + TextField("", text: .constant("sa"), prompt: Text("Search")) + } + .padding(.horizontal) + } } else { TabView { BrowseView(emojiHoarder: emojiHoarder, gifHoarder: gifhoarder) diff --git a/StickerSlack/SwiftUI/Misc/ListRow.swift b/StickerSlack/SwiftUI/Misc/ListRow.swift deleted file mode 100644 index c31d01b..0000000 --- a/StickerSlack/SwiftUI/Misc/ListRow.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// ListRow.swift -// StickerSlack -// -// Created by neon443 on 21/11/2025. -// - -import SwiftUI - -struct ListRow: View { - @State var number: Int - @State var text: String - - var body: some View { - HStack { - Text("\(number)") - .padding(.trailing, 10) - .foregroundStyle(.gray) - Text(text) - } - } -} - -#Preview { - ListRow(number: 1, text: "hi!") -} diff --git a/StickerSlack/SwiftUI/SearchView.swift b/StickerSlack/SwiftUI/SearchView.swift index da18c35..cf8b877 100644 --- a/StickerSlack/SwiftUI/SearchView.swift +++ b/StickerSlack/SwiftUI/SearchView.swift @@ -10,6 +10,7 @@ import SwiftUI struct SearchView: View { @ObservedObject var hoarder: EmojiHoarder + @FocusState private var searchFocused: Bool @State private var currentSearch: Task? @State var searchTerm: String = "" @State var previousSearches: [String] = [] @@ -59,12 +60,6 @@ struct SearchView: View { onTapCallback: { callback($0) }) } else { - Picker("", selection: $stickerType) { - ForEach(StickerType.allCases) { type in - Text(type.description).tag(type) - } - } - .pickerStyle(.segmented) switch stickerType { case .slackEmoji: Text("\(searchResult.count)") @@ -73,6 +68,12 @@ struct SearchView: View { case .giphyGifs: Text("uhh") } + Picker("", selection: $stickerType) { + ForEach(StickerType.allCases) { type in + Text(type.description).tag(type) + } + } + .pickerStyle(.segmented) } } .searchable(text: $searchTerm) diff --git a/StickerSlack/SwiftUI/WelcomeView.swift b/StickerSlack/SwiftUI/WelcomeView.swift index 25e71be..db50b58 100644 --- a/StickerSlack/SwiftUI/WelcomeView.swift +++ b/StickerSlack/SwiftUI/WelcomeView.swift @@ -28,16 +28,21 @@ struct WelcomeView: View { } .padding(.vertical, 16) .padding(.leading, 16) - List { - Section("How to use") { - ListRow(number: 1, text: "Browse or search for an emoji") - ListRow(number: 2, text: "Download it") - ListRow(number: 3, text: "Open iMessage") - ListRow(number: 4, text: "Press the +") - ListRow(number: 5, text: "Choose StickerSlack") - ListRow(number: 6, text: "Tap an emoji to use it!") - } + LazyVGrid( + columns: Array( + repeating: GridItem(.flexible(minimum: 50, maximum: 1000)), + count: UIScreen.main.bounds.width < UIScreen.main.bounds.height ? 2 : 4 + ) + ) { + ListRow(number: 1, text: "Browse or Search", image: Image(uiImage: #imageLiteral(resourceName: "1-browseOrSearch"))) + ListRow(number: 2, text: "Download it", image: Image(systemName: "arrow.down.circle")) + ListRow(number: 3, text: "Open iMessage", image: Image(systemName: "message.fill")) + ListRow(number: 4, text: "Tap the +", image: Image(systemName: "plus.circle.fill")) + ListRow(number: 5, text: "Choose Stickers", image: Image(uiImage: #imageLiteral(resourceName: "stickersIcon.png"))) + ListRow(number: 6, text: "Find StickerSlack", image: Image(uiImage: #imageLiteral(resourceName: "iMessageAppIcon"))) + ListRow(number: 7, text: "Tap a sticker!", image: Image(systemName: "arrow.up.message")) } + .padding() .modifier(ScrollContentBackgroundHidden()) Spacer() Group { @@ -62,6 +67,32 @@ struct WelcomeView: View { .interactiveDismissDisabled() } } + + private struct ListRow: View { + @State var number: Int + @State var text: String + @State var image: Image? + + var body: some View { + VStack(alignment: .center) { + HStack { + Spacer() + .overlay(alignment: .leading) { + Text("\(number)") + .font(.headline) + .bold() + .foregroundStyle(.gray) + } + Text(text) + .lineLimit(nil) + Spacer() + } + image?.resizable().scaledToFit() + .frame(maxHeight: 40) + } + .padding(.bottom) + } + } } fileprivate struct ContinueButtonView: View { diff --git a/StickerSlackiMessageApp/Info.plist b/StickerSlackiMessageApp/Info.plist index 52e0429..c0c200c 100644 --- a/StickerSlackiMessageApp/Info.plist +++ b/StickerSlackiMessageApp/Info.plist @@ -2,6 +2,10 @@ + MSSupportedPresentationContexts + + MSMessagesAppPresentationContextMessages + NSExtension NSExtensionMainStoryboard