基于 UILabel 使用 CALayer 的简单可动画徽章
BadgeLabel *badge = [BadgeLabel new];
badge.text = @"42";
易于配置外观
badge.backgroundColor = [UIColor blueColor];
badge.hasBorder = YES;
badge.hasGloss = NO;
包括两个类
BadgeLabel - 基于 UILabel 的徽章,可以是 Mail.app 风格的灰色,或者带有边框和光泽的应用程序图标样式红色,或者任何其他颜色和样式组合。
BadgeTableViewCell - 带有 Mail.app 风格徽章的 UITableViewCell。
与基于 CoreGraphics 的徽章不同,此徽章类可以提供 CoreAnimation 层的灵活性和强大功能 - 运行示例应用程序,看看有多简单。
注意