i swift 2 i was getting the systemLocale using the bellow code:
let systemLocaleCountryCode = NSLocale.systemLocale().objectForKey(NSLocaleCountryCode) as? String
but now i in swift 3 , i am receiving the bellow error :
cannot call value of non function type locale
then once i changed it to :
let systemLocaleCountryCode = NSLocale.systemLocale.objectForKey(NSLocaleCountryCode) as? String
I've received another error:
value of type Locale has no member objectForKey
what's the problem ? How to fix it ?