ziplyne1/mojipicker
A drop-in SwiftUI emoji picker.
Installation
MojiPicker is on the Swift Package Index. Install it using the Swift Package Manager.
In Xcode, go to File → Add Package Dependencies… Then, enter the following URL and select “Add Package.”
https://github.com/ziplyne1/MojiPickerUsage
After importing MojiPicker, you can show an emoji picker in two ways:
- Initialize an
EmojiPicker - Apply the
.emojiPickerview modifier
EmojiPicker
EmojiPicker(
selectedSymbol: Binding<String?>,
// dismissOnSelection: Bool = true
).emojiPicker
MyView()
.emojiPicker(
isPresented: Binding<Bool>,
selectedSymbol: Binding<String?>,
// dismissOnSelection: Bool = true
)Example
@State private var showPicker = false
@State private var selectedSymbol: String? = nil
var body: some View {
Button("Pick Emoji") {
showPicker = true
}
.emojiPicker(
isPresented: $showPicker,
selectedSymbol: $selectedSymbol
)
}Contributing
All contributions are welcome. Please open a pull request and give a clear description of your changes.
Building
In order to keep the .xcodeproj of the demo app clean, please run the setup.sh script before building the app, as it configures local signing settings required for the demo app to build. It will create a file called DeveloperSettings.xcconfig which will not be committed to GitHub.
You may need to run chmod +x setup.sh to make the script executable.
Package Metadata
Repository: ziplyne1/mojipicker
Default branch: main
README: README.md