title: Swift - Get list of countries
body: <p>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:</p>
  
  <pre><code>if (!pickerCountriesIsShown) {
      NSMutableArray *countries = [NSMutableArray arrayWithCapacity: [[NSLocale ISOCountryCodes] count]];
  
      for (NSString *countryCode in [NSLocale ISOCountryCodes])
      {
          NSString *identifier = [NSLocale localeIdentifierFromComponents: [NSDictionary dictionaryWithObject: countryCode forKey: NSLocaleCountryCode]];
          NSString *country = [[NSLocale currentLocale] displayNameForKey: NSLocaleIdentifier value: identifier];
          [countries addObject: country];
      }
  </code></pre>
  
  <p>And in Swift I can't pass from here:</p>
  
  <pre><code>        if (!countriesPickerShown) {
          var countries: NSMutableArray = NSMutableArray()
          countries = NSMutableArray.arrayWithCapacity((NSLocale.ISOCountryCodes).count) // Here gives the Error. It marks NSLocale.ISOCountryCodes and .count
  </code></pre>
  
  <p>Does anyone of you know about this?</p>
  
  <p>Thanks</p>