Giter VIP home page Giter VIP logo

11shraddha / facebooklikereaction Goto Github PK

View Code? Open in Web Editor NEW
65.0 2.0 10.0 430 KB

FacebookLikeReaction is a customizable view which provides more options to share your reactions on any post like Facebook Reactions.

License: MIT License

Swift 87.33% Ruby 12.67%
reactions animation animation-effects longpressdrag facebook facebook-reactions facebook-reaction facebook-animation like-button likebutton likebuttonanimation

facebooklikereaction's Introduction

FacebookLikeReaction

CI Status Version License Platform

FacebookLikeReaction is a customizable view which provides more options to share your reactions on any post like Facebook Reactions.

alt tag

Example

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

Requirements

iOS 10.0+
Xcode 10.0+
Swift 4.2+

Installation

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

pod 'FacebookLikeReaction'

Usage

class ViewController: UIViewController {

   override func viewDidLoad() {
       super.viewDidLoad()

        // Create a UIButton 
        var btnReaction = UIButton(frame: CGRect(x: 100, y: 300, width: 200, height: 30))
        btnReaction.setTitle("Long Press here", for: .normal)
        btnReaction.setTitleColor(UIColor.red, for: .normal)
        view.addSubview(btnReaction)

       var reactionView = ReactionView()
       let reactions: [Reaction] = [Reaction(title: "Laugh", imageName: "icn_laugh"),
                            Reaction(title: "Like", imageName: "icn_like"),
                            Reaction(title: "Angry", imageName: "icn_angry"),
                            Reaction(title: "Love", imageName: "icn_love"),
                            Reaction(title: "Sad", imageName: "icn_sad")]
        
        reactionView.initialize(delegate: self , reactionsArray: reactions, sourceView: self.view, gestureView: btnReaction)
    }
 }

//MARK: - FacebookLikeReactionDelegate
extension ViewController: FacebookLikeReactionDelegate {
    
    func selectedReaction(reaction: Reaction) {
        print("Selected-------\(reaction.title)")
    }
}

Author

11Shraddha, [email protected]

License

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

facebooklikereaction's People

Contributors

11shraddha avatar hamzakiyani43 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

facebooklikereaction's Issues

gestureView property is extra

What if I need to add this ReactionView on touch up event instead of long press? Why do you forbid to customize this behaviour?

any ideas around table schema to support this?

did you implement?
We have likes in app / but it seems quite complex to support multiple types of responses.
or maybe could be like table with a type....
need to refine the query to get number of likes to number of responses of type.....

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.