gpt4 book ai didi

iphone - performSegueWithIdentifier 不工作

转载 作者:行者123 更新时间:2023-11-28 22:52:14 25 4
gpt4 key购买 nike

当我点击一个按钮时,我会运行这段代码:

[self performSegueWithIdentifier:@"services" sender:self];
NSLog(@"ButtonClicked");

我可以看到每次按下按钮时都会出现日志消息,但segue 未激活

在我的 Storyboard文件中,我有一个名为 services 的转场,这是我要激活的转场。

知道我哪里出错了吗?


编辑该按钮位于标签栏 Controller 内,这会影响事情吗?

最佳答案

对于推送,您需要将源 View Controller 嵌入到导航 Controller 中。您可以按如下方式执行此操作:

Select your source view controller, Go to Editor and select Embed In -> Navigation Controller.

关于iphone - performSegueWithIdentifier 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11666391/

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