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