How do I get a list of countries in Swift ios?
问题 I've already seen two similar questions to mine, but the answers for those questions do not work for me. I have an old project with a list of countries manually typed out inside a set of square brackets. I can easily use this in my pickerView but I'm wondering if there is a more efficient way to do this? I will be using the list of countries in a UIPickerView. 回答1: You can get a list of countries using the NSLocale class's isoCountryCodes which returns an array of [String] . From there, you