多年来,我注意到Apple在使用Swift时已删除了诸如“NS”之类的前缀。现在,当我浏览本地通知教程时,我发现UIUserNotificationSettings已被弃用,它要求我们改用UNNotificationSettings。我知道“NS”代表“下一步”,所以“UN”代表某种意义吗?

最佳答案

通常,框架中的每个项目都使用其名称前缀

UIButton -> UIKit -> User Interface

AVAudioPlayer -> AVFoundation -> Audio Video

UNNotification -> UserNotifications - > User Notification

关于ios - “UN”在UNNotification中代表什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50776782/

10-13 00:01