ios - 在标签栏 Controller 之前添加 View Controller

标签 ios uitabbarcontroller

我是 Objective-C 和 iOS 编程的新手。我正在构建一个标签栏应用程序。但是在标签栏 View Controller 加载之前。我想加载“登录屏幕”。

-我能够做到一半。

我创建了一个新的标签栏应用程序。 我添加了一个新的 View Controller 并将其设为“初始” View Controller ,创建了一个新的 objective-c 类并将其关联到新的 View Controller 。

现在如何在检查用户用户名/密码后加载标签栏 View Controller ?

最佳答案

最好/最简单的方法可能是不要在开始时使用 UITabBarController

让您的 LoginViewController 成为您的 windowrootViewController 直到用户登录。然后将其更改为 UITabBarController(不包括登录 View )。您可以在 AppDelegate.m 文件中执行此操作。

关于ios - 在标签栏 Controller 之前添加 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22642547/

相关文章:

ios - 有没有办法断点所有按钮的 touchUpInside 方法?

ios - NSDictionary/Hash(如果内容已更改)

ios - 是否可以将摄像头集成到导航 Controller 中?

ios - 如何读取自定义 UITableViewCell 中 UISwitch 的变化

ios - 在 TableView 索引列表中显示整个字母表(横向)

iphone - 如何: Save order of tabs when customizing tabs in UITabBarController

iphone - 从选项卡栏返回到第一个 View

swift - 以编程方式显示 TabBar 元素的子 ViewController(并传递数据)

ios - 标签栏不显示图标?

swift - 呈现带有标签栏的 View Controller