Contentmode Properties for IOS Uiimageview

Source: Internet
Author: User


The red box represents the ImageView frame, and the picture below is the original size
Uiviewcontentmodescaletofill, By default, stretches the picture (not proportionally), is full of bouns

Uiviewcontentmodescaleaspectfit, stretched according to the original proportions, is the picture fully displayed in the bouns

Uiviewcontentmodescaleaspectfill, filled by the original proportions so that the picture is displayed in Bouns, may only show part

Uiviewcontentmoderedraw,//Redraw on Bounds change (calls-setneedsdisplay)

Uiviewcontentmodecenter, the image is displayed in the middle of the ImageView, the original size

Uiviewcontentmodetop, picture shown on top of ImageView, original size

Uiviewcontentmodebottom, the image is shown in the lower part of ImageView, the original size

Uiviewcontentmodeleft, the picture is shown on the left side of the ImageView, the original size

Uiviewcontentmoderight, the picture is displayed on the right of the ImageView , the original size

Uiviewcontentmodetopleft, the picture is shown in the upper left of ImageView, the original size

Uiviewcontentmodetopright, the picture is shown in the upper right of ImageView, the original size

Uiviewcontentmodebottomleft, the picture is shown in the lower left of ImageView, the original size

Uiviewcontentmodebottomright, the picture is shown in the lower right part of ImageView, the original size

Contentmode Properties for IOS Uiimageview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.