Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 672 Bytes
//
// Badge.swift
// extensions-kit
//
// Created by Astemir Eleev on 01/12/2018.
// Copyright © 2018 Astemir Eleev. All rights reserved.
//
import UIKit
#if os(iOS)
/// Allows to easily manage the UIApplication icon badge number status
public struct Badge {
private static let sharedApplication = UIApplication.shared
public static var number: Int {
set {
sharedApplication.applicationIconBadgeNumber = newValue
}
get {
return sharedApplication.applicationIconBadgeNumber
}
}
public static func reset() {
sharedApplication.applicationIconBadgeNumber = 0
}
}
#endif
You can’t perform that action at this time.