Latest 1.0.1
Homepage https://github.com/raphaelcruzeiro/SwiftyBadgeButton
License MIT
Platforms ios 8.0
Authors

SwiftyBadgeButton
SwiftyBadgeButton
SwiftyBadgeButton

Installation

use_frameworks!

pod 'SwiftyBadgeButton'

Usage

SwiftyBadgeButton is a subclass of UIButton and can be used just as one. To set the badge, all you need to so is set a text:

badgeButton.badgeText = "1"

Properties

  • animated Sets whether the badge should animate upon setting a badgeText. Default: true
  • badgeInset Sets the insets and outsets for the badge
  • badgeSize Sets the default badge size. The width will grow automatically according to the text. The height will always stay the same. _Default: CGSize(width 15, height: 15)
  • badgeBackgroundColor Sets the badge background color. Default: UIColor.red
  • badgeFont Sets the badge font. Default: UIFont.systemFont(ofSize: 10)
  • badgeTextColor Sets the badge text color. Default: UIColor.white

Latest podspec

{
    "name": "SwiftyBadgeButton",
    "version": "1.0.1",
    "summary": "A simple, 100% Swift and fully tested badge button.",
    "description": "SwiftyBadgeButton is a simple to use, 100% Swift, fully tested badge button.",
    "homepage": "https://github.com/raphaelcruzeiro/SwiftyBadgeButton",
    "license": "MIT",
    "authors": {
        "Raphael Cruzeiro": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/raphaelcruzeiro/SwiftyBadgeButton.git",
        "tag": "1.0.1"
    },
    "source_files": "SwiftyBadgeButton",
    "exclude_files": "Classes/Exclude",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This