小编Yur*_*sov的帖子

xcode 6.1 iOS 8.1 NSLocale displayNameForKey NSLocaleIdentifier返回nil

- (NSString *)countryNameByCode:(NSString*)countryCode
{
    NSString *identifier = [NSLocale localeIdentifierFromComponents:@{NSLocaleCountryCode: countryCode}];
    NSString *countryName = [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:identifier];

    return countryName;
}

这回来了nil.为什么?

objective-c ios nslocale

17
推荐指数
3
解决办法
6983
查看次数

标签 统计

ios ×1

nslocale ×1

objective-c ×1