iOS auto-layout problem

Source: Internet
Author: User

Today to make a little footerview my heart almost gas out ...

The first step creates a new view Xib file

The second step is to create a new UIView class

The third step is to put a lable in the middle of the UIView, add the constraint, horizontal vertical Center

The fourth step instantiates the UIView and assigns it to the TableView Footerview

Then the question came, and I found the lable not show in the vertical screen ... Normal under Horizontal screen

And then I thought, "Is this footerview not scaled, set to scaled

Footerview.contentmode=uiviewcontentmodescaletofill ... Useless

Value before and after assignment the width of the custom view, 320 Ah, it hasn't changed.

Then a variety of search information ... No fruit, ask no one in the group met ... I wipe, no one brought the little brother is poor Ah

Go on, think about what you did wrong.

Is it related to the opening of the compact width and any width? I'm a little out of my mind. Compact width ...

Check Information

Http://www.cnblogs.com/zhw511006/p/3998534.html

Originally, different views are not the same device supported ...

Set to any width

Finally came out, brain ...

iOS auto-layout problem

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.