Instance Method

resizableImageWithCapInsets:resizingMode:

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

Declaration

- (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets resizingMode:(UIImageResizingMode)resizingMode;

Parameters

capInsets

The values to use for the cap insets.

resizingMode

The mode with which the interior of the image is resized.

Return Value

A new image object with the specified cap insets and resizing mode.

Discussion

This method is exactly the same as its counterpart resizableImageWithCapInsets: except that the resizing mode of the new image object can be explicitly declared. You should only call this method in place of its counterpart if you specifically want your image to be resized with the UIImageResizingModeStretch resizing mode.

See Also

Changing the Image Attributes

- imageWithConfiguration:

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

- imageByApplyingSymbolConfiguration:

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

- imageFlippedForRightToLeftLayoutDirection

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

- imageWithHorizontallyFlippedOrientation

Returns a new version of the image whose orientation is the mirror of the original image.

- imageWithRenderingMode:

Returns a new version of the image configured with the specified rendering mode.

- imageWithAlignmentRectInsets:

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

- resizableImageWithCapInsets:

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

- imageWithoutBaseline

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

- imageWithBaselineOffsetFromBottom:

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

UIImageConfiguration

A configuration object containing the traits that the system used when selecting the current image variant.

UIImageSymbolConfiguration

An object containing the specific font, size, style, and weight attributes to apply to a symbol image.