Emoji selector like Facebook Reactions
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example Update `readme` and example Apr 12, 2018
Pod Remove copyright Apr 12, 2018
.gitignore Initial commit Mar 1, 2016
.travis.yml Initial commit Mar 1, 2016
JOEmojiableBtn.podspec Update Podspec to 3.0.0 version. Apr 11, 2018
LICENSE Initial commit Mar 1, 2016
README.md Update readme Apr 12, 2018
_Pods.xcodeproj Initial commit Mar 1, 2016

README.md

JOEmojiableBtn

Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

πŸ“±πŸ•πŸ“±πŸ•πŸ“±πŸ•πŸ“±πŸ•πŸ“±


Installation

JOEmojiableBtn is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JOEmojiableBtn"

Examples

1. Basic Instance

This instance create a JOEmojiableBtn using default JOEmojiableBtnConfig. Images from Trump reactionpacks style.

Example Code

let optionsDataset = [
    JOEmojiableOption(image: "img_1", name: "img1"),
    JOEmojiableOption(image: "img_2", name: "img2"),
    JOEmojiableOption(image: "img_3", name: "img3"),
    JOEmojiableOption(image: "img_4", name: "img4"),
    JOEmojiableOption(image: "img_5", name: "img5"),
    JOEmojiableOption(image: "img_6", name: "img6")
]

let buttonSample1 = JOEmojiableBtn(frame: CGRect(origin: CGPoint(x: 40, y: 200), size: CGSize(width: 100, height: 50)))
buttonSample1.delegate = self
buttonSample1.backgroundColor = .green
buttonSample1.dataset = optionsDataset
view.addSubview(buttonSample1)

Sample 1

2. Custom styled instance

Example Code

With this instance you can fully custom your component. Following the JOEmojiableConfig variables.

You can custom your selector with the following variables, used in the

687474703a2f2f692e696d6775722e636f6d2f65347a616179652e706e673f31

image

let config = JOEmojiableConfig(spacing: 2,
                                size: 30,
                                minSize: 34,
                                maxSize: 45,
                                spaceBetweenComponents: 30)

let buttonSample2 = JOEmojiableBtn(frame: CGRect(origin: CGPoint(x: 40, y: 300), size: CGSize(width: 100, height: 50)), config: config)
buttonSample2.delegate = self
buttonSample2.backgroundColor = .green
buttonSample2.dataset = optionsDataset
view.addSubview(buttonSample2)

Author

Jorge Ovalle, jroz9105@gmail.com

image

License

JOEmojiableBtn is available under the MIT license. See the LICENSE file for more info.