subRegions
An array of all the sub-regions of the region.
Declaration
var subRegions: [Locale.Region] { get }Discussion
The following example looks up the sub-regions of region 021, which represents North America.
let northAmericaRegion = Locale.Region("021")
let subRegions = northAmericaRegion.subRegions //BM, CA, GL, PM, USThe returned subRegions have the following identifiers:
Identifier | Country |
|---|---|
BM | Bermuda |
CA | Canada |
GL | Greenland |
PM | Saint Pierre and Miquelon |
US | United States |