UIViewContentMode
UIViewContentMode
enumeration contains constants that specify the position of a capture device.
class UIViewContentMode {
static const int ScaleToFill = 0;
static const int ScaleAspectFit = 1;
static const int ScaleAspectFill = 2;
static const int Redraw = 3;
static const int Center = 4;
static const int Top = 5;
static const int Bottom = 6;
static const int Left = 7;
static const int Right = 8;
static const int TopLeft = 9;
static const int TopRight = 10;
static const int BottomLeft = 11;
static const int BottomRight = 12;
}
Constant | Description |
---|---|
ScaleToFill | The option to scale the content to fit the size of itself by changing the aspect ratio of the content if necessary. |
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. |
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. |
Redraw | The option to redisplay the view when the bounds change by invoking the setNeedsDisplay method. |
Center | The option to center the content in the view’s bounds, keeping the proportions the same. |
Top | The option to center the content aligned at the top in the view’s bounds. |
Bottom | The option to center the content aligned at the bottom in the view’s bounds. |
Left | The option to align the content on the left of the view. |
Right | The option to align the content on the right of the view. |
TopLeft | The option to align the content in the top-left corner of the view. |
TopRight | The option to align the content in the top-right corner of the view. |
BottomLeft | The option to align the content in the bottom-left corner of the view. |
BottomRight | The option to align the content in the bottom-right corner of the view. |
Info
For more information, please see the official Apple documentation.