Shapes can be resized using the .size
modifier. This is somewhat similar to adding padding to the trailing and bottom edges, since the shape will shrink as such padding increases.
But padding also increases the size of the frame, so it’s only really equivalent to when a fixed frame size has been provided.
This code sample allows you to modify the size and frame of a Rectangle
, and to see those changes in real time.
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.