Skip to content

Instance PropertyFoundationEssentials

subRegions

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
An array of all the sub-regions of the region.
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, US

The returned subRegions have the following identifiers:

Identifier

Country

BM

Bermuda

CA

Canada

GL

Greenland

PM

Saint Pierre and Miquelon

US

United States