当用户选择单元格时,如何在UITabBarController中对不同的选项卡执行segue?

时间:2016-02-15 03:33:40

标签: ios swift uitabbarcontroller

我在UITableViewCell的第一个标签中有UITabBarController,其中包含一系列内容。当用户选择一个单元格时,我希望它可以转到UITabBarController中的其他标签。

我使用以下代码完成了它:

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)
{
     performSegueWithIdentifier("PerformPlaylistsSegue", sender: self)

    tableView.deselectRowAtIndexPath(indexPath, animated: true)
}

然而,现在问题是,底部标签栏导航被阻止。

我发现了以下类似的问题:

How can I segue to the second tab of a tab bar controller from the first tab?

Tab Bar Controller / Segue Issue

这两个帖子都提到了不适合选择不同的标签。

但是,根据我的申请目的,有没有办法强迫这种情况发生?

1 个答案:

答案 0 :(得分:0)

我已经决定不要捣乱母亲的Xcode并将我的UITableView放在ViewController中,而这个选项卡应该是假设的,而不是处理头痛。