function RealizationEnter the registration interface from the login interface to return to the login interface from the registration interface
function Realization Idea
Search on the internet found that you are using navigation, but the individual feel not (zhen) large (ting) must (BU) (dong). So here is another idea: directly to the registration Page view added to the login interface, and so on after the registration of the direct remove can be. function Realization Diagram
first, from the landing interface into the registration interface
Define the Registration interface
@interface LOGINANDREGISTVC ()
@property (nonatomic,strong) registervc *registervc;
@end
Convert registration interface from login interface
-(ibaction) BTNGOTOREGISTERVC: (UIButton *) Sender {SELF.REGISTERVC =[[registervc alloc]init
] ;//Initialize Registration Page view Controller
[Self.registerVC.view setbackgroundcolor:[uicolor redcolor]];//Set the background color of the view for the registration page
[Self.view addsubview:self.registervc.view];//The view on the login interface to add the registration interface
self.registervc.view.center= Self.view.center;
} Adjust the alignment of a view
second, from the registration interface switch back to the landing interface
Switch from the registration interface back to the login interface
-(ibaction) Eventregister: (UIButton *) sender {
[self.view Removefromsuperview];
[Self Removefromparentviewcontroller];
}
Known defectsAdd the view of the registration interface, and find that view does not cover parent view completely (as you can see from the red background), if the parent view boundary area has other content, it will affect the appearance from the interface. No animation effect Oh (Fall)