A flag used to determine how a view lays out its content when its bounds change.
- iOS 2.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The content mode specifies how the cached bitmap of the view’s layer is adjusted when the view’s bounds change. This property is often used to implement resizable controls. Instead of redrawing the contents of the view every time, you can use this property to specify that you want to scale the contents (either with or without distortion) or pin them to a particular spot on the view.
For a list of values you can assign to this property, see
UIView.ContentMode. The default value of this property is
Configuring the Resizing Behavior
Resizes and moves the receiver view so it just encloses its subviews.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software