IOS FAQ (What ghost series)--problems that cannot be modified from the code after adding Size Class mizmization in Storyboard, storyboardsizeclass

Source: Internet
Author: User

IOS FAQ (What ghost series)--problems that cannot be modified from the code after adding Size Class mizmization in Storyboard, storyboardsizeclass

 

 

Preface

The company's products are compatible with the iPhone and iPad at the same time, and insist on using Storyboard for adaptation. Today, another pitfall (previously encountered) thinks it is a ghost problem of XCode.

 

Statement 
You are welcome to repost, but please keep the original source of the article :)
Blog: http://www.cnblogs.com
Farmer's uncle: http://over140.cnblogs.com

 

Body

I. Purpose/Requirement

The text on iPhone 4, iPhone 6, and iPad must have different font sizes and image widths.

 

Ii. Problems

As shown in: On the Storyboard, set the "18" character on the iPad for UILabel. The image uses 160 on the iPad. Then, drag the constraint into the ViewController and determine that it is the value of iPhone 4 to fix the constraint.

However, you find that no matter how you change the code, it does not work !! Clean almost gave up countless times !! I thought it would be the impact of Add Size Class mizmization. It would be nice to delete it!

 

Iii. Solution

What else can be done? Only Add Size Class Customization can be removed. In addition, you can use NSLayoutConstraint for [iOS] screen adaptation.

 

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.