Swift 3中的NSCurrentLocaleDidChangeNotification?

Gar*_*yle 2 swift swift3

什么是Notification.Name等效NSCurrentLocaleDidChangeNotification

Mar*_*n R 5

根据NSLocale参考

class let currentLocaleDidChangeNotification: NSNotification.Name
// Notification that indicates that the user’s locale changed.
Run Code Online (Sandbox Code Playgroud)

您可以将其用作

let notification = NSLocale.currentLocaleDidChangeNotification
Run Code Online (Sandbox Code Playgroud)

  • 愚蠢的我认为这将是在较新的Locale类中;) (2认同)