Latest 1.0.0
Homepage https://github.com/Gypsyan/KGBadgeView
License Apache License, Version 2.0
Platforms ios 8.0, requires ARC
Authors

KGBadgeView – Get an awesome badge view :collision: :+1:

Build Status
Swift3+ Compatible
CocoaPods

A quick way to add badge icon on the UIView elements.

Alt Text

Cocoapods

use_frameworks!

target 'yourApp' do
    platform :ios, '9.0'
    pod 'KGBadgeView', '~> 1.0'
end

How to ??

Initialize

   let kgBadgeObj = KGBadgeView()
   kgBadgeObj.initWithView(view: yourViewElement)

Set Badge

kgBadgeObj.setCount(2)
kgBadgeObj.showCount()

Set Font

kgBadgeObj.setFont(fontObj: UIFont(name: "HelveticaNeue", size: 20)!)

Set Size

kgBadgeObj.setSize(width: 25, height: 25)

Set BackGround color

kgBadgeObj.setBackgroundColor(color: UIColor.red)

Set Text color

kgBadgeObj.setTextColor(color: UIColor.white)

Set Position

To set position for a badge use teh following

 kgBadgeObj.setPostion(xAxis: 110, yAxis: -10)

Set Animations

 kgBadgeObj.showAnimation(type: KGBadgeView.AnimType.shakeAnim)

Different animations,

  • KGBadgeView.AnimType.defaultAnim
  • KGBadgeView.AnimType.shakeAnim
  • KGBadgeView.AnimType.blinkAnim
  • KGBadgeView.AnimType.swingAnim
  • KGBadgeView.AnimType.pulseAnim

Support

For support raise an issue here.

Please feel free to contribute 💪✌️💯

Latest podspec

{
    "name": "KGBadgeView",
    "version": "1.0.0",
    "summary": "Add badge above the UIView elements",
    "homepage": "https://github.com/Gypsyan/KGBadgeView",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Ananth": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Gypsyan/KGBadgeView.git",
        "tag": "1.0.0"
    },
    "source_files": "KGBadgeView/**/*.swift",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This