iOS development-using Xib to fit iphone X

Source: Internet
Author: User

Recently in the modification of an old project, there are many xib files, need to fit the iphone X, but do not want to rewrite the page with code, share a small method, is a stupid way,

At the bottom of the iphone x, the iphone x has a 34px operating area on the bottom, while the other models are not, as follows:

1.

2.

3. Double-click the arrow to enter the following interface:

Then, it's ready!

The above navigation adaptation, at present I have not found how to use, if everyone has any good way, can share under, this even stupid method,

The steps are as follows:

1,

2, Specific code:

Self.bgViewTop.constant = navheight;[ Self.bgview Setneedslayout];

And then it's ready!

iOS development-using Xib to fit iphone X

Related Article

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.