Swift - Get list of countries

后端 未结 3 1536
抹茶落季
抹茶落季 2021-02-06 13:55

How can I get an array with all countries names in Swift? I\'ve tried to convert the code I had in Objective-C, which was this:

if (!pickerCountriesIsShown) {
           


        
3条回答
  •  借酒劲吻你
    2021-02-06 14:24

    It is an Operation not a Property

    if let codes = NSLocale.ISOCountryCodes() {
        println(codes)
    }
    

提交回复
热议问题