模态

//模态跳转到指定页面

 -(void) rightClick {

secondViewController  *vc = [[secondViewController alloc] init];

[self presentViewController:vc animated:YES completion:nil];

//[self.navigationController pushViewController:vc animated:YES];

}

//模态返回到指定页面

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

//回到指定的页面

//[self.navigationController popToViewController:<#(UIViewController *)#> animated:<#(BOOL)#>]

//[self.navigationController popViewControllerAnimated:YES];

[self dismissViewControllerAnimated:YES completion:nil];

}

你可能感兴趣的:(模态)