ios - 我应该如何编码导致相同 segue 模板的多个集合?
问题描述
![截图] https://imgur.com/a/D4hBy37
从屏幕截图中可以看出,我在右侧有多个集合视图。所有这些都导致相同的segue模板,我需要区分数据但我无法弄清楚
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if(segue.identifier=="cardToDiscover" && sender is BaroqueData){
let toViewController = segue.destination as! PlacesInDepthViewController
let indexPath = sender as! IndexPath
toViewController.section = baroqueData.sections[indexPath.row]
}
}
baroqueData 是一个包含数据的模型,但对于屏幕截图上显示的每个集合视图应该是不同的。
解决方案
推荐阅读
- python - 如何使用熊猫图获得两个图例,一个用于堆叠条的颜色,一个用于条的阴影?
- r - 有没有办法将线图(分辨率更高)叠加到条形图(分辨率较低)上?
- unity3d - 安装了没有集线器版本的 Unity,现在统一集线器不允许我添加模块
- reactjs - 将全局状态复制到组件本地状态
- python - Sqlalchemy 为父母过滤父子表
- java - java.net.URL 上的 toExternalForm 和 toString 之间是否存在语义差异?
- python - 在 Pandas 中加入两个数据帧从另一个数据帧中删除值
- mysql - 将带有 sql 数据库的 PYQT5 应用程序导出到 .exe
- excel - 从一张 * 复制 2 然后粘贴
- c - 如何从用户的输入中为每个数字分配变量?