美文网首页
Notification 书写简化

Notification 书写简化

作者: BabyNeedCare | 来源:发表于2021-05-14 10:24 被阅读0次

简化书写

extension Notification.Name {

    public static let KingfisherDidCleanDiskCache = Notification.Name.init("com.onevcat.Kingfisher.KingfisherDidCleanDiskCache")
}

NotificationCenter.default.post(name: .KingfisherDidCleanDiskCache, object: self, userInfo: [KingfisherDiskCacheCleanedHashKey: cleanedHashes])

相关文章

网友评论

      本文标题:Notification 书写简化

      本文链接:https://www.haomeiwen.com/subject/alvpqltx.html