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,