gpt4 book ai didi

ios - 启动时登录,UITabBarViewController 加载问题,iOS

转载 作者:行者123 更新时间:2023-11-29 01:21:28 25 4
gpt4 key购买 nike

我通过切换 window.rootViewController 实现了应用程序启动时的登录,如下所述:http://sweettutos.com/2014/01/08/present-a-login-screen-before-the-tab-bar-controller-in-a-uitabbarcontroller-based-app/

不知何故,成功登录后显示的 UIViewController 未正确加载,我在其 UITableView 中看不到任何内容:

enter image description here

当我单击顶部选项卡栏的任何选项时,一切都会正确显示并且一切都开始工作,所以问题只是第一个屏幕没有任何结果:

enter image description here

这里非常重要的一点是,在启动时登录完成一次后,下次应用程序在重新加载应用程序(Xcode 中的 Command + R)时立即从主页启动,主页 是立即正确显示

所以,我的问题是这两种 Controller 加载情况有什么区别?为什么登录后加载不正确?我假设重新加载与登录应该会产生相同的结果。

Controller (主页、表格)在从本地存储接收到从 Web 服务器检索数据的通知时加载数据。

最佳答案

当 View 出现时,您需要设置标签栏的选定索引。

[myTabBar setSelectedItem:myTabBarItem];

关于ios - 启动时登录,UITabBarViewController 加载问题,iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34540797/

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