Fix sample app
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
B089F70829702B8400F0C479 /* EmojiPicker in Frameworks */ = {isa = PBXBuildFile; productRef = B089F70729702B8400F0C479 /* EmojiPicker */; };
|
B089F70829702B8400F0C479 /* EmojiPicker in Frameworks */ = {isa = PBXBuildFile; productRef = B089F70729702B8400F0C479 /* EmojiPicker */; };
|
||||||
B0B09EC6297206F9005F41E9 /* LimitedEmojiProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0B09EC5297206F9005F41E9 /* LimitedEmojiProvider.swift */; };
|
|
||||||
B0DD3892296ED65900DEFE36 /* EmojiPickerSampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0DD3891296ED65900DEFE36 /* EmojiPickerSampleApp.swift */; };
|
B0DD3892296ED65900DEFE36 /* EmojiPickerSampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0DD3891296ED65900DEFE36 /* EmojiPickerSampleApp.swift */; };
|
||||||
B0DD3894296ED65900DEFE36 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0DD3893296ED65900DEFE36 /* ContentView.swift */; };
|
B0DD3894296ED65900DEFE36 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0DD3893296ED65900DEFE36 /* ContentView.swift */; };
|
||||||
B0DD3896296ED65B00DEFE36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0DD3895296ED65B00DEFE36 /* Assets.xcassets */; };
|
B0DD3896296ED65B00DEFE36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B0DD3895296ED65B00DEFE36 /* Assets.xcassets */; };
|
||||||
@@ -17,7 +16,6 @@
|
|||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
B089F70629702B7E00F0C479 /* EmojiPicker */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = EmojiPicker; path = ..; sourceTree = "<group>"; };
|
B089F70629702B7E00F0C479 /* EmojiPicker */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = EmojiPicker; path = ..; sourceTree = "<group>"; };
|
||||||
B0B09EC5297206F9005F41E9 /* LimitedEmojiProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LimitedEmojiProvider.swift; sourceTree = "<group>"; };
|
|
||||||
B0DD388E296ED65900DEFE36 /* EmojiPickerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EmojiPickerSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
B0DD388E296ED65900DEFE36 /* EmojiPickerSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EmojiPickerSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
B0DD3891296ED65900DEFE36 /* EmojiPickerSampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerSampleApp.swift; sourceTree = "<group>"; };
|
B0DD3891296ED65900DEFE36 /* EmojiPickerSampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerSampleApp.swift; sourceTree = "<group>"; };
|
||||||
B0DD3893296ED65900DEFE36 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
B0DD3893296ED65900DEFE36 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||||
@@ -63,7 +61,6 @@
|
|||||||
B0DD3893296ED65900DEFE36 /* ContentView.swift */,
|
B0DD3893296ED65900DEFE36 /* ContentView.swift */,
|
||||||
B0DD3895296ED65B00DEFE36 /* Assets.xcassets */,
|
B0DD3895296ED65B00DEFE36 /* Assets.xcassets */,
|
||||||
B0DD3897296ED65B00DEFE36 /* Preview Content */,
|
B0DD3897296ED65B00DEFE36 /* Preview Content */,
|
||||||
B0B09EC5297206F9005F41E9 /* LimitedEmojiProvider.swift */,
|
|
||||||
);
|
);
|
||||||
path = EmojiPickerSample;
|
path = EmojiPickerSample;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -163,7 +160,6 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
B0B09EC6297206F9005F41E9 /* LimitedEmojiProvider.swift in Sources */,
|
|
||||||
B0DD3894296ED65900DEFE36 /* ContentView.swift in Sources */,
|
B0DD3894296ED65900DEFE36 /* ContentView.swift in Sources */,
|
||||||
B0DD3892296ED65900DEFE36 /* EmojiPickerSampleApp.swift in Sources */,
|
B0DD3892296ED65900DEFE36 /* EmojiPickerSampleApp.swift in Sources */,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,12 +1,30 @@
|
|||||||
{
|
{
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "smile",
|
"identity" : "emojikit",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/onmyway133/Smile",
|
"location" : "https://github.com/tyiu/EmojiKit",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "40604722a7a56f735124e069fcbb58307637744b",
|
"revision" : "719d405244ea9ef462867c16e3d3254b7386b71f",
|
||||||
"version" : "2.1.0"
|
"version" : "0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-collections",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/apple/swift-collections.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "ee97538f5b81ae89698fd95938896dec5217b148",
|
||||||
|
"version" : "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-trie",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/tyiu/swift-trie",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "0bb65eec3d570e8a0f6bd5c6a72f10641b97c71e",
|
||||||
|
"version" : "0.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import EmojiPicker
|
import EmojiPicker
|
||||||
|
import EmojiKit
|
||||||
|
|
||||||
struct ContentView: View {
|
struct ContentView: View {
|
||||||
|
|
||||||
@@ -16,15 +17,12 @@ struct ContentView: View {
|
|||||||
@State
|
@State
|
||||||
var displayEmojiPicker: Bool = false
|
var displayEmojiPicker: Bool = false
|
||||||
|
|
||||||
@State
|
|
||||||
var displayLimitedEmojiPicker: Bool = false
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
VStack {
|
VStack {
|
||||||
Text(selectedEmoji?.value ?? "")
|
Text(selectedEmoji?.value ?? "")
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
Text(selectedEmoji?.name ?? "")
|
Text(selectedEmoji?.localizedKeywords["en"]?.joined(separator: ", ") ?? "")
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
}
|
}
|
||||||
.padding(8)
|
.padding(8)
|
||||||
@@ -34,13 +32,6 @@ struct ContentView: View {
|
|||||||
Text("Select standard emoji")
|
Text("Select standard emoji")
|
||||||
}
|
}
|
||||||
.buttonStyle(.borderedProminent)
|
.buttonStyle(.borderedProminent)
|
||||||
Button {
|
|
||||||
displayLimitedEmojiPicker = true
|
|
||||||
} label: {
|
|
||||||
Text("Select limited emoji (custom provider)")
|
|
||||||
}
|
|
||||||
.buttonStyle(.borderedProminent)
|
|
||||||
.padding(.top, 8)
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
.sheet(isPresented: $displayEmojiPicker) {
|
.sheet(isPresented: $displayEmojiPicker) {
|
||||||
@@ -51,14 +42,6 @@ struct ContentView: View {
|
|||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $displayLimitedEmojiPicker) {
|
|
||||||
NavigationView {
|
|
||||||
EmojiPickerView(selectedEmoji: $selectedEmoji, selectedColor: .orange, emojiProvider: LimitedEmojiProvider())
|
|
||||||
.padding(.top, 32)
|
|
||||||
.navigationTitle("Emojis")
|
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//
|
|
||||||
// LimitedEmojiProvider.swift
|
|
||||||
// EmojiPickerSample
|
|
||||||
//
|
|
||||||
// Created by Kévin Sibué on 13/01/2023.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import EmojiPicker
|
|
||||||
|
|
||||||
final class LimitedEmojiProvider: EmojiProvider {
|
|
||||||
|
|
||||||
func getAll() -> [Emoji] {
|
|
||||||
return [
|
|
||||||
Emoji(value: "🚀", name: "rocket"),
|
|
||||||
Emoji(value: "🇫🇷", name: "France"),
|
|
||||||
Emoji(value: "🦄", name: "unicorn"),
|
|
||||||
Emoji(value: "🍺", name: "beer"),
|
|
||||||
Emoji(value: "💶", name: "euro")
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -15,7 +15,6 @@ let package = Package(
|
|||||||
dependencies: [
|
dependencies: [
|
||||||
// Dependencies declare other packages that this package depends on.
|
// Dependencies declare other packages that this package depends on.
|
||||||
// .package(url: /* package url */, from: "1.0.0"),
|
// .package(url: /* package url */, from: "1.0.0"),
|
||||||
// .package(url: "https://github.com/tyiu/EmojiKit", branch: "emoji-keywords")
|
|
||||||
.package(url: "https://github.com/tyiu/EmojiKit", .upToNextMajor(from: "0.1.0")),
|
.package(url: "https://github.com/tyiu/EmojiKit", .upToNextMajor(from: "0.1.0")),
|
||||||
.package(url: "https://github.com/tyiu/swift-trie", .upToNextMajor(from: "0.1.1"))
|
.package(url: "https://github.com/tyiu/swift-trie", .upToNextMajor(from: "0.1.1"))
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user