Contents

hasAlpha

A Boolean value that indicates whether the image data has an alpha channel.

Declaration

var hasAlpha: Bool { get set }

Discussion

The value of this property is true if the receiver has a known alpha channel; otherwise, false.

Subclasses can set this property when loading image data to notify the parent class whether that data contains an alpha component. Specifying a value of true does not add an alpha channel to the image data itself; it merely records the fact that the data has an alpha channel.

See Also

Specifying Information About the Representation