Contents

resizable(capInsets:resizingMode:)

Sets the mode by which SwiftUI resizes an image to fit its space.

Declaration

func resizable(capInsets: EdgeInsets = EdgeInsets(), resizingMode: Image.ResizingMode = .stretch) -> Image

Parameters

  • capInsets:

    Inset values that indicate a portion of the image that SwiftUI doesn’t resize.

  • resizingMode:

    The mode by which SwiftUI resizes the image.

Mentioned in

Return Value

An image, with the new resizing behavior set.