怎么使用自定义segue,实现波纹跳转

来源:互联网 发布:python pyalgotrade 编辑:程序博客网 时间:2024/06/11 15:47

modal无法实现,push可能能够实现。

modal

presentModalViewController:animated:completion:^(void){ //code };

dismiss方法

dismissModalViewControllerAnimated:                 // 将要废弃,不赞成继续使用dismissViewControllerAnimated:completion:

CustomSegue

-(void)perform{

    CATransition* animation = [CATransitionanimation];

    [animationsetDuration:0.5f];

    [animation setType:@"rippleEffect"];//波纹效果 @“rippleEffect”

    

    [animation setTimingFunction:[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseOut]];

    

    [[[self.destinationViewControllerview] layer]addAnimation:animation forKey:@"transition"];


    [[selfsourceViewController] presentViewController:self.destinationViewController

                                                   animated:NO

                                                 completion:Nil];

    

}

push



0 0
原创粉丝点击