IOS xib View wide height cannot be changed

Source: Internet
Author: User

Ios-xib (Interface builder,view)-can ' t change view size (view cannot resize)

Today in the swift language to write a demo, which encountered this problem, share

When we define the cell of TableView and collectionview ourselves, there are times when we have to define the form xib ourselves, but the height and width cannot be changed after the Xib is created.

Then the problem comes. How to make our own definition xib wide can be changed:

When creating a xib, separate view in the project,

Method:

Default simulated metric in size:inferred (judgment), the view height, width can not be changed;

change to Size:freeform. now our xib view width can be changed.

I did not care about this problem before, I know today! Hope to continue learning


IOS xib View wide height cannot be changed

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.