iOS 视图跳转

//跳转
- ( void)present:( id )sender {
    NSLog ( @"the button,is clicked …" );
    // 创建准备跳转的 UIViewController
    ModalViewController *modalViewController = [[ ModalViewController alloc ]init ];
    // 设置跳转效果
    modalViewController. modalTransitionStyle =UIModalTransitionStyleCoverVertical ;
    // 开始跳转
    [ self  presentViewController :modalViewController animated : YES
                completion :^{ NSLog ( @"call back" );}];
}
 

//关闭
- ( void )finishPage:sender
{
    NSLog ( @"back button click …" );
    [ self    dismissViewControllerAnimated : YES
                                     completion :^{ NSLog ( @"DISMISS" );}];
}

 
原文地址:https://www.cnblogs.com/hl666/p/3655283.html