Contents

register(_:with:)

Registers an image with the specified trait collection.

Declaration

func register(_ image: UIImage, with traitCollection: UITraitCollection)

Parameters

  • image:

    The image you want to register with the image asset.

  • traitCollection:

    The traits to associate with image.

Discussion

Each image in an image asset must have a unique set of traits. If the asset already contains a registered image with the equivalent traits, it replaces that image with the one in the image parameter.

See Also

Registering and unregistering images