size

Returns a new version of self representing the same shape, but that will ask it to create its path from a rect of size. This does not affect the layout properties of any views created from the shape (e.g. by filling it).

Shape ModifieriOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+

Overloads

4 ways to call compose().size(). Each is one SwiftUI overload, picked by the arguments you pass.

React
compose().size(size: CGSize)
Swift
nonisolated func size(_ size: CGSize) -> some Shape

Parameters

  • size*CGSize

See also

More in Shape modifiers.