One: Guest interface effect
Two: Code
1: Business logic Analysis: 1: Because the user is not logged in to display the guest view, to determine whether the user is logged in, not logged in the guest view, login to display the normal landing interface, because the controller in the four sub-controller interface to determine whether to show the guest view, the same logic, so consider the parent class, The logic that determines whether to show the guest view is encapsulated in the parent class, allowing subclasses to inherit. 2: The guest view's interface encapsulates the guest view in a view with a relatively fixed interface, so it is built with Xib, and the controls shown as much as possible are encapsulated in the interior of the view first. Based on the external model or defining methods in the encapsulation class to control the display of the control or the display and hiding of the corresponding control, 3: Determine whether the user is logged in by overriding the Loadview method in the parent class controller to set whether to load the guest view
2: Guest View build: New file Inheritance UIView, new xib with the new UIView class with the same name, first came to Xib, the class is associated with xib, you can not set the effect of freeform,xib build
1:1: Drag into the Uiimageview to set the rotated picture: Set the Xib constraint at first, set the control to center horizontally vertically relative to the parent view, center horizontally vertically at position (where 1 is set to the horizontal vertical center relative to the parent view, Figure 2 is vertically centered horizontally, and is generally selected two controls , set control A to center vertically horizontally relative to control B). 2: Set
Swift Project Seventh Day: Building the Guest interface and listening button click