image(with:)
Retrieves the variant of the image that best matches the specified trait collection.
Declaration
func image(with traitCollection: UITraitCollection) -> UIImageParameters
- traitCollection:
The trait collection to use when determining which image to return.
Return Value
The found image.
Discussion
If this method can’t locate an image that matches the specified trait collection precisely, it returns the best match available.