Latest 0.1.0
Homepage https://github.com/lojals/JOEmojiableBtn
License MIT
Platforms ios 8.0, requires ARC
Authors

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 with the Reactions Style.

Example Code

let btn             = JOEmojiableBtn(frame: CGRectMake(40,200,50,50))
btn.delegate        = self
btn.backgroundColor = UIColor.greenColor()
btn.dataset         = [
    JOEmojiableOption(image: "img_1", name: "dislike"),
    JOEmojiableOption(image: "img_2", name: "broken"),
    JOEmojiableOption(image: "img_3", name: "he he"),
    JOEmojiableOption(image: "img_4", name: "ooh"),
    JOEmojiableOption(image: "img_5", name: "meh!"),
    JOEmojiableOption(image: "img_6", name: "ahh!")
]
self.view.addSubview(btn)

image

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

image

image

let config              = JOEmojiableConfig(spacing: 2, size: 30, minSize: 34, maxSize: 45, s_options_selector: 30)
let btn2                = JOEmojiableBtn(frame: CGRectMake(40,300,50,50), config: config)
btn2.delegate           = self
btn2.backgroundColor    = UIColor(red:0.27, green:0.69, blue:0.67, alpha:1)
btn2.layer.cornerRadius = 25
btn2.dataset            = [
    JOEmojiableOption(image: "img_1", name: "dislike"),
    JOEmojiableOption(image: "img_2", name: "broken"),
    JOEmojiableOption(image: "img_3", name: "he he"),
    JOEmojiableOption(image: "img_4", name: "ooh"),
    JOEmojiableOption(image: "img_5", name: "meh!"),
    JOEmojiableOption(image: "img_6", name: "ahh!"),
    JOEmojiableOption(image: "img_4", name: "ooh")
]
self.view.addSubview(btn2)

image

To Do

  • Create different layouts, inferior, left, depending on the superview position.
  • Add Option labels.

Author

Jorge Ovalle, [email protected]

image

License

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

Latest podspec

{
    "name": "JOEmojiableBtn",
    "version": "0.1.0",
    "summary": "Option selector that works similar to Reactions by fb",
    "description": "Totally customizable Options (Emoji) Selector based on Reactions",
    "homepage": "https://github.com/lojals/JOEmojiableBtn",
    "license": "MIT",
    "authors": {
        "Jorge Ovalle": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lojals/JOEmojiableBtn.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/lojals_",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "JOEmojiableBtn": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This