ios - 呈现一个导航栏和一个非 Root View 选项卡 Controller

标签 ios swift xcode uinavigationcontroller uitabbarcontroller

我正在尝试在其他 Storyboard上呈现帐户 View Controller 。但是当我呈现它时,选项卡栏没有显示。

这是我在另一个 Storyboard上的代码,我希望当按下另一个 Storyboard上的按钮时,它会转到帐户 View Controller (参见图片)对不起我的英语。谢谢

        let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil)
        let vc = storyboard.instantiateViewController(withIdentifier: "UAE")
        self.present(vc, animated: true)

编辑:抱歉问错问题了。让我重新表述一下。抱歉,我是编程和 swift 新手。

这是我的第一个 Storyboard,当我点击“上传简历”时,它会转到第二个 Storyboard并显示我的 AccountViewController 或它的命名标识符为“帐户”,但当我尝试显示它时,包含的选项卡栏3 个选项卡栏项目未显示。只是导航栏。我如何呈现具有 3 个选项卡栏项目的 AccountViewController。非常感谢您的回复。

这是我的第一个 Storyboard

enter image description here

这是我的第二个 Storyboard

enter image description here

这是当我点击上传简历时显示我的 AccountViewController 的代码

let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "Account")
self.present(vc, animated: true)

最佳答案

 let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil)
 let vc = storyboard.instantiateViewController(withIdentifier: "UAE")
 self.navigationcontroller.present(vc, animated: true)

请尝试这个。

关于ios - 呈现一个导航栏和一个非 Root View 选项卡 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41585843/

相关文章:

Swift:CountableRange<Int> 数组:传递给不带参数的调用的参数

ios - 索要号码功能错误 canOpenURL : failed for URL: "tel://0478733797" - error: "This app is not allowed to query for scheme tel"

IOS/X代码 : Calling NSFetchedResultsController Method in Other Class

iPhone app 类似 Twitter 的设计结构

iOS 获取两个字符串之间的字符串

ios - App 在 4 英寸时认为它在 3.5 英寸 iPhone 上运行

ios - NSLayoutConstraints 的 UIViewPropertyAnimator 使 View 消失

iphone - Xcode4 的 UserInterfaceState 文件给 Git 和 Subversion 带来麻烦

ios - CLLocationDegrees 到 Swift 中的字符串变量

iphone - MPMediaPickerController.showsCloudItems 似乎什么都不做