An array of query items for the URL in the order in which they appear in the original query string.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 6.0.1+
URLQuery represents a single key-value pair,
Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the
URLComponents has an empty query component, returns an empty array. If the
URLComponents has no query component, returns nil.
The setter combines an array containing any number of
URLQuerys, each of which represents a single key-value pair, into a query string and sets the
URLComponents query property. Passing an empty array sets the query component of the
URLComponents to an empty string. Passing nil removes the query component of the