IOS Development uses storyboard to preview how the UI works on different screens _ios

Source: Internet
Author: User

In the company to do projects have been using storyboard, although sometimes encounter a team cooperation storyboard conflict, but for the storyboard development efficiency is relatively cost-effective. As mentioned in previous blogs, when teams work with storyboard, the best way to avoid conflict is to work with UI developers to maintain a storyboard, common components that are implemented using lightweight xib or pure code. This not only enhances the development efficiency, but also can effectively avoid the storyboard conflict. If everyone maintains a storyboard, it is OK to encounter conflict with your own.

To get back to the next step, let's go over how to use storyboard to preview how the UI works on a different resolution screen, and that's a good way to avoid every adjustment constraint to run to see the effect of running on different planes, Today's blog is a detailed description of how to use storyboard to perform preview effects. Let's take a step-by-step look at how to preview the effect.

  First, create the project to add test use Uiimageview

Create a test project, add 4 different sizes of Uiimageview on the Viewcontroller, add different constraints, and finally add different art and fresh pictures, and the controls and constraints on the final storyboard are shown below.

 Second, open the preview interface

1. Click on the top left corner of the storyboard button-> Click Preview-> Press the Potion + SHIFT key Click the corresponding storyboard, the specific operation as shown in the following figure:

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

  Third, add preview device

1. Double-click on the plus button back to appear preview window, in the preview window, there is a plus button in the lower left, through the plus button you can add different sizes of the screen to preview, from 3.5 to the ipad everything, add the screenshot below is shown below.


2. Add all the above devices to the future preview effect shown in the following figure, this preview is limited to the use of storyboard implementation of the control, but the use of pure code to write the UI is not so lucky. The preview results are as follows:


The storyboard is still pretty strong, similar to this small skill, storyboard still have many, in this does not do one by one to repeat, later has the opportunity to return slowly the introduction, at the end of the blog to share my Meng Meng of the desktop bar ~ but this desktop for your technology improvement and no eggs with ~, wish everyone happy every day, work happy!


The above introduction is the whole content of this article, hope to be helpful to everybody.

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.