NotificationCenter.post(customeNotification: .gotFcmToken)
enum Noti: String {
case gotFcmToken
var stringValue: String {
return "Noti" + rawValue
}
var notificationName: NSNotification.Name {
return NSNotification.Name(stringValue)
}
}
extension NotificationCenter {
static func post(customeNotification name: Noti, object: Any? = nil){
NotificationCenter.default.post(name: name.notificationName, object: object)
}
}