gpt4 book ai didi

ios - Storyboard自定义 segue if/else?

转载 作者:行者123 更新时间:2023-11-28 22:56:19 24 4
gpt4 key购买 nike

.

你好,

我正在尝试为我的 Storyboard制作自定义转场。现在我注意到似乎一个 segue 只能走一条路。

这是真的吗?或者我可以在那里设置一个 if/else 语句吗?

我已经试过了,但是在最初的 tab/click 按钮之后就没用了。

我错过了什么吗?

我有点想到这一点。在评论区我有代码,但我是按照想法的原则。

- (void) perform{
CGFloat ledge = 25;
CGSize screenSize = UIScreen.mainScreen.bounds.size;
BOOL left = TRUE;



MainViewController *src = (MainViewController *) self.sourceViewController;
SideMenuVC *dst = (SideMenuVC *) self.destinationViewController;

// [src presentViewController:dst animated:YES completion:nil];
[src.navigationController pushViewController:dst animated:YES];

if(left){

//Do the first thing, but the view is still partly in the screen

}else {


//Return to original place

}
}

最佳答案

不幸的是,UISegues 只是一种方式。您必须手动关闭模式 UIViewControllers 或使用 popViewControllerAnimated: 用于 UINavigationController。

关于ios - Storyboard自定义 segue if/else?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10733628/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com