iOS development uses storyboard preview UI to run on different screens

Source: Internet
Author: User

In the company to do projects have been using storyboard, although sometimes encounter storyboard conflict problem of teamwork, but for storyboard development efficiency is relatively cost-effective. As mentioned in the previous blog, when teams work with storyboard, it is a good idea to avoid conflicts, and it is best for colleagues who are responsible for UI development to maintain a storyboard, and the common components are implemented using lightweight xib or pure code. This not only improves the development efficiency, but also can effectively avoid the conflict of storyboard. If everyone maintains a storyboard and encounters a conflict, it is OK to take your own.

To get back to the next step, let's look at how to use storyboard to preview how the UI works on a different resolution screen, which is a good way to avoid each adjustment constraint running to see the effect on different planes. Today's blog details how to use the storyboard to perform the preview run effect. Then take a step-by-step look at how to preview the effect.

First, create the project to add the test used Uiimageview

Create a test project, add 4 different sizes of Uiimageview on Viewcontroller, add different constraints, and finally add a different literary little fresh picture, and finally the controls and constraints on the storyboard are as follows.

Second, open the preview screen

1. Click the button on the top left corner of the storyboard, click Preview, press Potion + SHIFT to click the corresponding storyboard, as shown in the following:


2. After the above operation, you will see the following interface, in this interface you can click on the right side of the plus button to add the Preview window, as shown in:

Third, add preview device

1. Double-click the Plus button on the back of the preview window, there is a plus button at the bottom left of the preview window, with the plus button you can add different sizes of screen to preview, from 3.5 to ipad everything, add is as follows.

2. Add all of the above devices to the preview effect as shown, this preview effect is limited to controls implemented using storyboard, but the UI written in plain code is less fortunate. The preview works as follows:

Storyboard or is quite strong, similar to this small skill, storyboard There are many, in this do not do one by one repeat, after the opportunity to go back to the introduction, at the end of the blog for everyone to share my cute desktop bar ~ However, this desktop for your technology improvement and no egg use ~, wish everyone happy every day, work happy!

    

iOS development uses storyboard preview UI to run on different screens

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.