Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A macOS-style popover to select emojis in your iOS apps

License

NotificationsYou must be signed in to change notification settings

htmlprogrammist/EmojiPicker

Repository files navigation


EmojiPicker is a customizable package
implementing macOS-style emoji picker popover
Emoji Picker Preview

Swift CI badge

Navigation

Installation

Ready for use with Swift 4.2+ on iOS 11.1+

Swift Package Manager

TheSwift Package Manager is a tool for automating the distribution of Swift code and is integrated into theswift compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

In Xcode navigate to File → Swift Packages → Add Package Dependency. Use this URL to add the dependency:

‌https://github.com/htmlprogrammist/EmojiPicker

Once you have your Swift package set up, adding as a dependency is as easy as adding it to thedependencies value of yourPackage.swift.

dependencies:[.package(url:"https://github.com/htmlprogrammist/EmojiPicker",.upToNextMajor(from:"3.0.0"))]

CocoaPods

TheCocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrateEmojiPicker into your Xcode project using CocoaPods, specify it in yourPodfile:

pod'EmojiPicker',:git=>'https://github.com/htmlprogrammist/EmojiPicker'

Manually

If you prefer not to use any of dependency managers, you can integrate manually. PutSources/EmojiPicker folder in your Xcode project. Make sure to enableCopy items if needed andCreate groups.

Quick Start

CreateUIButton and add selector as action:

@objcprivatefunc openEmojiPickerModule(sender:UIButton){letviewController=EmojiPickerViewController()    viewController.delegate=self    viewController.sourceView= senderpresent(viewController, animated:true)}

And then recieve emoji in the delegate method:

extensionViewController:EmojiPickerDelegate{func didGetEmoji(emoji:String){        emojiButton.setTitle(emoji, for:.normal)}}

Usage

Delegate

Delegate for EmojiPicker to provide chosen emoji.

viewController.delegate=self

Source View

A view containing the anchor rectangle for the popover. You can create anyUIView instances and set them as thesender.

viewController.sourceView= sender

Also, there is way more settings for configuration:

Selected emoji category tint color

Color for the selected emoji category. The default value of this property is.systemBlue.

viewController.selectedEmojiCategoryTintColor=.systemRed

Arrow direction

The direction of the arrow for EmojiPicker. The default value of this property is.up.

viewController.arrowDirection=.up

Horizontal inset

Inset from thesourceView border. The default value of this property is0.

viewController.horizontalInset=0

Is dismissed after choosing

Defines whether to dismiss emoji picker or not after choosing. The default value of this property istrue.

viewController.isDismissedAfterChoosing=true

Custom height

Custom height for EmojiPicker. The default value of this property isnil.

viewController.customHeight=300

Feedback generator style

Feedback generator style. To turn off, setnil to this parameter. The default value of this property is.light.

viewController.feedbackGeneratorStyle=.soft

Experiments

To play around with the project, contribute to it, see how it works or adapt it for yourself:

  1. Clone or fork this repository to yourself
  2. OpenExample App/EmojiPicker.xcworkspace file
  3. ExpandPods target
  4. ExpandDevelopment Pods andEmojiPicker directories. Here you can make your changes
  5. Build & Run project to see an immediate result on an example application. Have fun!

Localization

  • Chinese 🇨🇳
  • English 🇬🇧
  • French 🇫🇷
  • German 🇩🇪
  • Hindi 🇮🇳
  • Russian 🇷🇺
  • Turkish 🇹🇷
  • Ukrainian 🇺🇦

You can also contribute your language to this list. Please, readfollowing heading for more information.

❗️ Note that the languages are arranged in alphabetical order

Contributing

This project is based onMCEmojiPicker and is one big contribution in it. And of course contributions are welcomed and encouraged here! Please see theContributing guide.

To be a truly great community, we need to welcome developers from all walks of life, with different backgrounds, and with a wide range of experience. A diverse and friendly community will have more great ideas, more unique perspectives, and produce more great code. We will work diligently to make our community welcoming to everyone.

To give clarity of what is expected of our members, we have adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see theCode of Conduct.


[8]ページ先頭

©2009-2025 Movatter.jp