Skip to content

Instantly share code, notes, and snippets.

View ashishkanani's full-sized avatar
🎯
Focusing

Ashish Kanani ashishkanani

🎯
Focusing
  • Earth
View GitHub Profile
@davidlawson
davidlawson / BadgeBarButtonItem.swift
Last active December 8, 2021 10:33
UIBarButtonItem with badge, Swift 4, iOS 9/10/11
import UIKit
public class BadgeBarButtonItem: UIBarButtonItem
{
@IBInspectable
public var badgeNumber: Int = 0 {
didSet {
self.updateBadge()
}
}