displayWhen(_:matches:)
Returns a display option that displays the component when a specified component meets the specified requirements.
Declaration
static func displayWhen(_ component: URL.FormatStyle.Component, matches requirements: Set<String>) -> URL.FormatStyle.ComponentDisplayOptionParameters
- component:
A component to compare. This may or may not be the component the strategy modifies. For example, a display option for the query might match against known values for the path.
- requirements:
A set of string values to match against. Matching any member of the set allows the format style to display the component.
Return Value
A display option that displays the component when a specified component meets the specified requirements.