UIViewController 和 UINavigationController 的问题

发布于 2024-12-25 22:48:02 字数 23 浏览 3 评论 0原文

好的,我需要有关表中此操作的帮助

Ok, i need help for this action in Table

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤星 2025-01-01 22:48:02

您可以使用 -popToRootViewControllerAnimated:-popToViewControllerAnimated:

在返回视图 1 的情况下,请使用:

[self.navigationController popToRootViewControllerAnimated:YES];

如果要返回到特定视图控制器,请获取这是参考,然后执行以下操作:

[self.navigationController popToViewController: specificViewController animated:YES];

You can either use -popToRootViewControllerAnimated: or -popToViewControllerAnimated:

In your case for returning to view 1, use:

[self.navigationController popToRootViewControllerAnimated:YES];

If you want to return to a specific view controller, get it's reference and then do:

[self.navigationController popToViewController: specificViewController animated:YES];
思慕 2025-01-01 22:48:02

如果您使用 Storyboard...

创建一个指向 View1 VC 的 Segue,并在触发“后退”按钮时执行该 Segue。

如果不是,Sid 的答案就是正确的。

If you are using Storyboard...

Create a Segue pointing to View1 VC and perform that Segue when the Back button is triggered.

If not, Sid's answer is correct.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文