JOEmojiableBtn 3.0.1

JOEmojiableBtn 3.0.1

Maintained by Jorge Ovalle.



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, [email protected]

image

License

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