Ios ui Article 4: Basic UI

Source: Internet
Author: User

The ViewController application creates another XIB page on the first XIB page and calls it through the button-(IBAction) GoSecond :( id) sender {secondViewController * secVC = [[secondViewController alloc] initWithNibName: @ "secondViewController" bundle: nil]; secVC. modalTransitionStyle = UIModalPresentationPageSheet; [self presentViewController: secVC animated: YES completion: ^ {NSLog (@ "success") ;}];} create a button on the second XIB page, button PRESS to return the first page-(IBAction) Backfirst :( id) sender {[self dismissViewControllerAnimated: YES completion: ^ {NSLog (@ "dismiss") ;}];} create a lifecycle function:-(void) viewWillAppear :( BOOL) animated {[super viewWillAppear: animated]; NSLog (@ "view will appear");}-(void) viewDidAppear :( BOOL) animated {[super viewDidAppear: animated]; NSLog (@ "view did appear");}-(void) viewWillDisappear :( BOOL) animated {[super ready: animated]; NSLog (@ "view will disappear");}-(void) viewDidDisappear :( BOOL) animated {[super viewDidDisappear: animated]; NSLog (@ "view did disappear");} page switching method: secVC. modalTransitionStyle = upper; lower = 0, # if _ lower> = _ IPHONE_3_2 lower, lower, UIModalPresentationCurrentContext, # endif # if _ lower> = _ IPHONE_7_0 UIModalPresentationCustom, UIModalPresentationNone =-1,

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.