Skip to content

Instance PropertyFoundationEssentials

containingRegion

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
The region that contains this region, if any.
var containingRegion: Locale.Region? { get }

Discussion

The following example shows how to look up the containing region for the US region.

let usRegion = Locale.Region("US")
let containingRegion = usRegion.containingRegion //Identifier "021": Northern America