Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.82 KB

README.md

File metadata and controls

55 lines (34 loc) · 1.82 KB

NGSBadgeBarButton

Version Platform Language GitHub license

v1.1 Swift 3.2 - 4.2

v1.2 Swift 4.0 - 5.0

v1.3 Swift 5

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