gpt4 book ai didi

ios - 我可以在我的 Storyboard的第二个 View 中启动我的 iOS 应用程序并使用 Unwind Segue 吗?

转载 作者:行者123 更新时间:2023-11-29 12:09:39 25 4
gpt4 key购买 nike

我的 Xcode Storyboard中有两个 View :

登录屏幕 -> UITableView

是否可以启动我的应用程序,使 UITableView 成为第一个显示的屏幕,并有一个将用户带回登录屏幕的展开转场?

我目前能够在 App Delegate 中设置 self.window.rootViewController 来设置第一个屏幕,但是没有一个 unwind segues 起作用。

这是我如何让它工作的我必须确保我的登录屏幕有一个导航 Controller ,然后在登录屏幕的 .m 文件中我使用了以下代码:

SecondViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondViewControllerStoryboardId"];
[self.navigationController pushViewController:vc animated:NO];

最佳答案

无需将您的第二个 View 显式设置为 rootViewController,只需在其 viewDidload 方法中将其从您的第一个 View 中推送,然后尝试 unwind segues 即可。

关于ios - 我可以在我的 Storyboard的第二个 View 中启动我的 iOS 应用程序并使用 Unwind Segue 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33884881/

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