从视图控制器到自身的故事板 [英] Storyboard Segue From View Controller to Itself

查看:81
本文介绍了从视图控制器到自身的故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个机制来深入查看文件/文件夹列表。这个想法是每次用户选择文件夹时显示相同的文件列表视图控制器,并在他/她选择文件时显示文件详细信息视图控制器。

I am trying to make a mechanism to drill down a file / folder list. The idea is to show the same file list view controller every time the user selects a folder, and show a file detail view controller if he/she selects a file.

所以我已经从文件列表视图控制器创建了一个segue到文件详细信息视图控制器,并从文件列表表视图单元格到文件列表表视图控制器中创建了一个segue:

So far, I have created a segue from the file list view controller to the file detail view controller, and a segue from the file list table view cell to the the file list table view controller:

这个问题是,一旦用户点击单元格,就会执行segue。我想从表视图单元格中删除segue,并从文件列表视图控制器中创建一个到自身。这样,我可以在用户点击单元格时以编程方式触发右侧segue。

The issue with this is that as soon as the user taps the cell, the segue is executed. I would like to remove the segue from the table view cell and make one from the file list view controller to itself. That way, I could trigger the right segue programmatically when the user tapped the cell.

所以,我的问题是:是否可以从视图控制器创建一个segue在Interface Builder中?

So, my question is: Is it possible to create a segue from a view controller to itself in Interface Builder?

推荐答案

我开发了一种使用幻像按钮创建segue的方法。我相信它会解决你的问题。您可以在我的答案中阅读这里

I developed a method to create a segue using a phantom button. I believe it will solve your problem. You can read about it in my answer here.

这篇关于从视图控制器到自身的故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆