Contents

withHorizontallyFlippedOrientation()

Returns a new version of the image that’s a mirror of the original image.

Declaration

func withHorizontallyFlippedOrientation() -> UIImage

Return Value

The new UIImage object.

Discussion

The returned image’s imageOrientation property contains the mirrored version of the original image’s orientation. For example, if the original orientation is UIImage.Orientation.left, the new orientation is UIImage.Orientation.leftMirrored. This method does not affect the value of the flipsForRightToLeftLayoutDirection property.

See Also

Changing the image attributes