NSLocale *currentLocale = [NSLocale currentLocale];
    NSArray *countryArray = [NSLocale ISOCountryCodes]; 
    
    for (NSString *key in countryArray)
    {
        NSLog(@"code : %@\n",key);
        NSString *displayNameString = [currentLocale displayNameForKey:NSLocaleCountryCode value:key]; 
        NSLog(@"displayNameString : %@\n",displayNameString);
    }
    
    NSLog(@"Country Code is %@", [currentLocale objectForKey:NSLocaleCountryCode]);
 
沒有留言:
張貼留言