'UN' 在 UNNotification 中代表什么?
What does the 'UN' stand for in UNNotification?
多年来,我注意到 Apple 在使用 Swift 时删除了 'NS' 等前缀。现在,当我浏览本地通知教程时,我看到 UIUserNotificationSettings 已被弃用,它要求我们改用 UNNotificationSettings。我知道 'NS' 代表下一步,那么 'UN' 代表什么可能存在相关性吗?
类如UNNotificationSettings
等UNNotification...
类都在UserNotifications
框架内。所以 "UN" 似乎是用于用户通知。
作为一般规则,框架内的每个项目都采用其名称前缀
UIButton -> UIKit -> User Interface
AVAudioPlayer -> AVFoundation -> Audio Video
UNNotification -> UserNotifications - > User Notification
多年来,我注意到 Apple 在使用 Swift 时删除了 'NS' 等前缀。现在,当我浏览本地通知教程时,我看到 UIUserNotificationSettings 已被弃用,它要求我们改用 UNNotificationSettings。我知道 'NS' 代表下一步,那么 'UN' 代表什么可能存在相关性吗?
类如UNNotificationSettings
等UNNotification...
类都在UserNotifications
框架内。所以 "UN" 似乎是用于用户通知。
作为一般规则,框架内的每个项目都采用其名称前缀
UIButton -> UIKit -> User Interface
AVAudioPlayer -> AVFoundation -> Audio Video
UNNotification -> UserNotifications - > User Notification