The iOS login interface switches to the registration interface and returns the UI design (easy to)

Source: Internet
Author: User
Tags switches
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)
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.