Coder Social home page Coder Social logo

htmlprogrammist / emojipicker Goto Github PK

View Code? Open in Web Editor NEW
46.0 5.0 10.0 2.16 MB

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

License: MIT License

Swift 99.42% Ruby 0.58%
emoji emoji-picker emoji-unicode ios swift emojipicker cocoapods language picker popover spm uikit

emojipicker's Introduction


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

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift 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 the dependencies value of your Package.swift.

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

CocoaPods

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

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

Manually

If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/EmojiPicker folder in your Xcode project. Make sure to enable Copy items if needed and Create groups.

Quick Start

Create UIButton and add selector as action:

@objc private func openEmojiPickerModule(sender: UIButton) {
    let viewController = EmojiPickerViewController()
    viewController.delegate = self
    viewController.sourceView = sender
    present(viewController, animated: true)
}

And then recieve emoji in the delegate method:

extension ViewController: 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 any UIView instances and set them as the sender.

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 the sourceView border. The default value of this property is 0.

viewController.horizontalInset = 0

Is dismissed after choosing

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

viewController.isDismissedAfterChoosing = true

Custom height

Custom height for EmojiPicker. The default value of this property is nil.

viewController.customHeight = 300

Feedback generator style

Feedback generator style. To turn off, set nil 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. Open Example App/EmojiPicker.xcworkspace file
  3. Expand Pods target
  4. Expand Development Pods and EmojiPicker 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, read following heading for more information.

❗️ Note that the languages are arranged in alphabetical order

Contributing

This project is based on MCEmojiPicker and is one big contribution in it. And of course contributions are welcomed and encouraged here! Please see the Contributing 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 the Code of Conduct.

emojipicker's People

Contributors

amucahidbozkurt avatar dimamishchenko avatar htmlprogrammist avatar izyumkin avatar uuidev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emojipicker's Issues

Crash on open

Experiencing a crash on controller presentation.
iOS 16.1.
Seems to be an issued with emojis json.

Screenshot 2023-02-03 at 10 54 37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.