nslocale - iOS8 - Get country names from locale -
i'm using code list of countries:
for (nsstring *code in [nslocale isocountrycodes]) { nsstring *identifier = [nslocale localeidentifierfromcomponents:@{nslocalecountrycode: code}]; nsstring *countryname = [[nslocale currentlocale] displaynameforkey:nslocaleidentifier value:identifier]; nslog(countryname); }
this works fine in ios 7.x fails in ios8 (beta 2) - countryname
being nil.
anyone found alternative yet?
i have faced such issue on ios 8. try use systemlocale
instead of currentlocale
.
Comments
Post a Comment