Instance Method

withHorizontallyFlippedOrientation()

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

Changing the Image Attributes

func withConfiguration(UIImage.Configuration) -> UIImage

Returns a new version of the current image, replacing the current configuration attributes with the specified attributes.

Beta
func applyingSymbolConfiguration(UIImage.SymbolConfiguration) -> UIImage?

Returns a new version of the current image, applying the specified configuration attributes on top of the current attributes.

Beta
func imageFlippedForRightToLeftLayoutDirection() -> UIImage

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

func withRenderingMode(UIImage.RenderingMode) -> UIImage

Returns a new version of the image configured 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

Returns a new version of the image that contains the specified cap insets.

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

Returns a new version of the image with the specified cap insets and options.

func imageWithoutBaseline() -> UIImage

Creates a copy of the current image object without any baseline information.

Beta
func withBaselineOffset(fromBottom: CGFloat) -> UIImage

Creates a new image with a baseline located at the specified offset from the bottom of the image.

Beta