Contents

contentsAreFlipped()

Returns a Boolean indicating whether the layer content is implicitly flipped when rendered.

Declaration

func contentsAreFlipped() -> Bool

Return Value

true if the layer contents are implicitly flipped when rendered or false if they are not. This method returns false by default.

Discussion

This method provides information about whether the layer’s contents are being flipped during drawing. You should not attempt to override this method and return a different value.

If the layer needs to flip its content, it returns true from this method and applies a y-flip transform to the graphics context before passing it to the layer’s draw(in:) method. Similarly, the layer converts any rectangles passed to its setNeedsDisplay(_:) into the flipped coordinate space.

See Also

Configuring the layer’s rendering behavior