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" );}];
}

 

 

posted @ 2014-01-15 18:51  嘟嘟夜未央  阅读(194)  评论(0编辑  收藏  举报