Latest 1.1.2
Homepage https://github.com/PauliusVindzigelskis/NGSBadgeBarButton
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

Version
Platform
Language
GitHub license

Swift 3.2 and 4.0 compatible

Install

Cocoapod

pod 'NGSBadgeBarButton'

Manual

Import NGSBadgeBarButton.swift file into Your project

Dependencies

None

Usage

Note: ‘insets’ parameter can be omit to use default value

// Set badge value and control label appearance
public private(set) weak var badgeLabel:UILabel! = nil

// Badge Bar Button with image
init(badgeButtonWithImage image: UIImage, 
                          target: Any,
                          selector: Selector, 
                          insets: UIEdgeInsets = NGSBadgeBarButton.kDefaultBadgeInsets)

// Badge Bar Button with title
init(badgeButtonWithTitle text: String, 
                          target: Any, 
                          selector: Selector, 
                          insets: UIEdgeInsets = NGSBadgeBarButton.kDefaultBadgeInsets)

// Custom Badge Bar Button
init(badgeButtonWithCustomView customView: UIView, 
                               insets: UIEdgeInsets = NGSBadgeBarButton.kDefaultBadgeInsets)

Demo

ngsbadgebarbutton_demo

Latest podspec

{
    "name": "NGSBadgeBarButton",
    "version": "1.1.2",
    "swift_version": "3.2",
    "summary": "UIBarButton with red badge in corner",
    "description": "UIBarButton subclass to provide option to set red badge on its corner. AutoLayout in action",
    "homepage": "https://github.com/PauliusVindzigelskis/NGSBadgeBarButton",
    "screenshots": "https://user-images.githubusercontent.com/2383901/36121468-e32e9756-100b-11e8-9e64-ddcd0d6e8514.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Paulius Vindzigelskis": "[email protected]"
    },
    "source": {
        "git": "https://github.com/PauliusVindzigelskis/NGSBadgeBarButton.git",
        "tag": "R1.1/1.1.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Pod/*.{swift}",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This