Enumeration

UIViewContentMode

Options to specify how a view adjusts its content when its size changes.

Symbols

Constants

case scaleToFill

The option to scale the content to fit the size of itself by changing the aspect ratio of the content if necessary.

case scaleAspectFit

The option to scale the content to fit the size of the view by maintaining the aspect ratio. Any remaining area of the view’s bounds is transparent.

case scaleAspectFill

The option to scale the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.

case redraw

The option to redisplay the view when the bounds change by invoking the setNeedsDisplay() method.

case center

The option to center the content in the view’s bounds, keeping the proportions the same.

case top

The option to center the content aligned at the top in the view’s bounds.

case bottom

The option to center the content aligned at the bottom in the view’s bounds.

case left

The option to align the content on the left of the view.

case right

The option to align the content on the right of the view.

case topLeft

The option to align the content in the top-left corner of the view.

case topRight

The option to align the content in the top-right corner of the view.

case bottomLeft

The option to align the content in the bottom-left corner of the view.

case bottomRight

The option to align the content in the bottom-right corner of the view.