Latest 0.1.2
Homepage https://github.com/rickytan/RTDraggableBadge
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

This project is inspired by Mobile QQ, a drag to clear badge view.

Usage

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

[self.button rt_setBadge:@"new"
              withHandle:^(RTDraggableBadge *badge, RTDragState state) {
                  if (state == RTDragStateDragged) {
                      badge.text = @"n";
                  }
              }];

RTDraggableBadge *badge = [RTDraggableBadge badgeWithDragHandle:^(RTDraggableBadge *badge, RTDragState state) {
    if (state == RTDragStateDragged) {
        // do clear your badge number
    }
}];

TL;DR

See the demo below:

Demo

Requirements

  • iOS 7+
  • Xcode 6+

Installation

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

pod "RTDraggableBadge"

Author

License

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

Latest podspec

{
    "name": "RTDraggableBadge",
    "version": "0.1.2",
    "summary": "A drag to clear badge view",
    "description": "This project is inspired by Mobile QQ, a drag to clear badge view.",
    "homepage": "https://github.com/rickytan/RTDraggableBadge",
    "screenshots": "https://github.com/rickytan/RTDraggableBadge/raw/master/demo.gif",
    "license": "MIT",
    "authors": {
        "rickytan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rickytan/RTDraggableBadge.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "RTDraggableBadge": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This