1

嗨,我正在尝试创建一个自定义模式 segue,将 src 视图控制器向右滑动,从而显示其后面的目标视图控制器。关于我如何实现它的任何想法

到目前为止,我已经尝试过了,但它不起作用。

#import "CustomMenuSegue.h"

@implementation CustomMenuSegue

- (void) perform {

    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;

    [UIView transitionWithView:src.navigationController.view duration:0.2 options:UIUserInterfaceLayoutDirectionRightToLeft
                    animations:^{
                        [src.navigationController modalTransitionStyle:dst animated:YES];
                    }
                    completion:NULL];

}


@end
4

0 回答 0