Latest 1.0.1
Homepage https://github.com/ypli-chn/YLBadge
License MIT
Platforms ios 7.0, requires ARC
Authors

YLBadge

YLBadge is a delightful library for iOS to show a badge on UIView, UIBarButtonItem and UITabBarItem.

Overview

Overview

Usage

#import "YLBadge.h"

// show ret dot
[self.testView yl_showBadge];

// show number
[self.testView2 yl_showBadgeNumber:23];

// show text
[self.textView3 yl_showBadgeText:@"new"];

// clear
[self.textView3 yl_clearBadge];

Global configuration

// setup just like UINavigationBar

YLBadge *appearance = [YLBadge appearance];
appearance.backgroundColor = [UIColor orangeColor];
appearance.textColor = [UIColor yellowColor];
appearance.alignment = YLBadgeAlignmentBottomRight;

Config someone badge

self.testView.yl_badge.backgroundColor = [UIColor orangeColor];
self.testView.yl_badge.maxDigit = 3;

Badge for anywhere

You can create instance of YLBadge, and then add it to anywhere such as UITableViewCell.

Installation

If you use Cocoapods, add pod 'YLBadge', '~> 1.0.1' to your Podfile.

If not, just add the folder YLBadge to your project. There are no further requirements.

License

YLBadge is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "YLBadge",
    "version": "1.0.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "A delightful library for iOS to show a badge on UIView, UIBarButtonItem and UITabBarItem.",
    "homepage": "https://github.com/ypli-chn/YLBadge",
    "authors": {
        "Yunpeng Li": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ypli-chn/YLBadge.git",
        "tag": "1.0.1"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "YLBadge/*.{h,m}"
}

Pin It on Pinterest

Share This