loadImage

fun NSBundle.loadImage(imageName: String, tintColor: UIColor?): UIImage

Loads an image from this bundle by its name, configured with template or original rendering modes based on whether a tint color is specified.

Return

The resolved UIImage.

Parameters

imageName

The name of the image asset in the asset catalog.

tintColor

Optional tint color. If not null, sets template rendering mode.