Switch between iOS guide interface and main interface

                                 The first part preview part

        The development tool used by the author is Apple's Xcode 6.0.1, and the simulator is iOS 8.0. To do this part of the work, you need to be familiar with two UI controls: one is UIscrollView, the other is UIPageControl. These two controls are often mixed together and mixed. (There is also a certain UI operation basis)

                                 The second part builds the file layout

       The developed file layout is as follows:

As for the creation of the files in the project, I will not describe it in detail here. Please refer to the author's blog post "Importing XMPP Framework". There are detailed steps here.

                               The third part of the UI interface construction

Click the login.storyboard in the above figure, drag a UINavgationController into it, and delete the table blue controller on the right. Drag a UIViewController, and then use the navigation controller as the root controller of the UIviewController. The specific operation is: click on the navigation controller, hold down the control key on the computer keyboard, drag a wire to UIviewController, and then a dialog box will pop up, just select rootViewController. The dialog box is as follows:

Second, click the navigation controller, go to its property bar, and use it as the initialization controller:


Start dragging the controls below the third. Select UIScrollView to cover the entire controller view. Then add UIPageControl and UIButton in the same way. Special attention is needed here! ! ! ! ! ! The latter two controls are not added to the UIScrollView, but to the view of the controller. Otherwise, the two controls will "disappear" as the scrollView is dragged! ! The final control sequence is as follows:



After the four controls have been added, they are connected to allow the controller to have these two properties. I won't say much here, it's relatively simple. After connecting, the properties of the controller should be as shown below:


Five then come to the file navigation bar:

-------The jump interface is as follows--------》》》》

6. Create a new main.storyboard and drag the tab bar controller into it, as shown in the figure:

Note: This also needs to check this box;

UI界面到这里就搭建完了,其中省略了一些步骤,需要大家有UI界面搭建的基础,由于不是这里的重心,故不详细叙述。


                                 第四部分:编写代码

不想再多说了,直接上图:

                                 第五部分 结果截图


Guess you like

Origin blog.csdn.net/qq_27740983/article/details/51392818