Instance Method

withHorizontallyFlippedOrientation()

Returns a version of the image whose image orientation is the 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

Creating Specialized Image Objects

class func animatedImage(with: [UIImage], duration: TimeInterval) -> UIImage?

Creates and returns an animated image from an existing set of images.

func imageFlippedForRightToLeftLayoutDirection() -> UIImage

Returns the current image, prepared to flip horizontally when it’s in a right-to-left layout.

func withRenderingMode(UIImage.RenderingMode) -> UIImage

Creates and returns a new image object with the specified rendering mode.

func withAlignmentRectInsets(UIEdgeInsets) -> UIImage

Returns a new version of the image that uses the specified alignment insets.

func resizableImage(withCapInsets: UIEdgeInsets) -> UIImage

Creates and returns a new image object with the specified cap insets.

func resizableImage(withCapInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode) -> UIImage

Creates and returns a new image object with the specified cap insets and options.