How to get language/country code using NSLocale in Swift 3 2018-01-19 if let languageCode = (Locale.current as NSLocale).object(forKey: .languageCode) as? String { print(languageCode) } if let countryCode = (Locale.current as NSLocale).object(forKey: .countryCode) as? String { print(countryCode) } 執行結果是: zh TW
[iOS] This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes. 2018-01-23