Latest 2.0.0
Homepage https://github.com/hemangshah/ClapsView
License MIT
Platforms ios 10.0, requires ARC
Authors

ClapsView 👏

Implemented the functionality of Medium.com Claps.

Build Status
License
Platform
Swift 4.x
MadeWithLove
Blog
Awesome-Swift

  1. Screenshots
  2. Features
  3. Installation
  4. Usage Guide
  5. Setup
  6. ToDos
  7. Credits
  8. Thanks
  9. License

Screenshots

Usage Usage
Usage

Features

  1. Create Programmatically or in Storyboard.
  2. Dynamic Property Configurations.
  3. Replica of Medium.com’s Claps.
  4. Lightweight with zero dependancies.

Installation

  1. Storyboard – Add a UIView and change the class in Identity Inspector to ClapsView.
  2. Manually – Add ClapsView.swift file to your Project.
  3. CocoaPodspod 'ClapsView'

You can read the CHANGELOG file for a particular release.

Usage Guide

  • Long Press – To start clapping. 👏
  • Double Tap – To remove current claps.
  • Single Tap – To see current Claps.

Setup

let claps = ClapsView.init(frame: CGRect.init(origin: CGPoint.zero, size: CGSize.init(width: 100.0, height: 100.0)))
claps.delegate = self
//Customize Emoji.
claps.emoji = "👏"
//The number of claps by all of the user.
claps.totalClaps = 30
//The maximum number of claps a user can do.
claps.maxClaps = 50
//If set true, 1000 claps will be display as 1k
claps.showClapsAbbreviated = true
self.view.addSubview(claps)
claps.center = self.view.center

//Implementing Delegate Call
extension ViewController: ClapsViewDelegate {
    func clapsViewStateChanged(clapsView: ClapsView, state: ClapsViewStates, totalClaps: Int, currentClaps: Int) {
        if state == .finalized {
            print("ClapsViewTag: (clapsView.tag) | Total Claps:(totalClaps) | Current Claps:(currentClaps)")
        }
    }
}

ToDo[s]

  • [x] CocoaPods Support

You can watch to ClapsView to see continuous updates. Stay tuned.

Have an idea for improvements of this class?
Please open an issue.

   

Credits

Hemang Shah

You can shoot me an email to contact.
 

Thank You!!

See the contributions for details.

License

The MIT License (MIT)

Read the LICENSE file for details.

Latest podspec

{
    "name": "ClapsView",
    "module_name": "ClapsView",
    "version": "2.0.0",
    "summary": "Implemented the functionality of Medium.com Claps. ud83dudc4f",
    "description": "ClapsView is a new way to give your ratings or feedback from your users.",
    "homepage": "https://github.com/hemangshah/ClapsView",
    "license": "MIT",
    "authors": {
        "hemangshah": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hemangshah/ClapsView.git",
        "tag": "2.0.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "source_files": "**/ClapsView.swift",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This