Xcode Storyboard是否应该支持带有“动态原型”单元格的UITableView的段落? [英] Should Xcode Storyboard support segues from a UITableView with 'dynamic prototype' cells?

查看:125
本文介绍了Xcode Storyboard是否应该支持带有“动态原型”单元格的UITableView的段落?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能让这个工作。如果我删除主UITableView以使用静态单元格我可以使segue工作,这样当你点击master中的一行时它会自动按下Child控制器。但是使用动态原型单元格,我点击其中一个单元格并且没有任何反应...

I can't get this working. If I drop the master UITableView to use Static cells I can get the segues working, such that when you click on a row in the master it automatically pushes the Child controller on. But with 'dynamic prototype' cells, I click on one of the cells and nothing happens...

我是否应该以编程方式将子控制器推送到 prepareForSegue 方法还是什么?在这种情况下,我不确定segue在这方面对于使用

Am I supposed to programmatically push the child controller within the prepareForSegue method or something? In which case I'm not sure what advantage a segue here would have over the old way of just using

推荐答案

不,你不必手动推送子控制器。您是否将故事板文件中的segue从动态单元格连接到子控制器?您是否也为动态单元格提供了标识符?您还可以查看本教程:

No, you don't have to manually push the child controller. Did you connect a segue in your storyboard file from the dynamic cell to the child controller? Also did you give your dynamic cells an identifier? You can also check out this tutorial:

http://maniacdev.com/ios-5-sdk-tutorial-and-guide/xcode-4-storyboard/

向下滚动到开始iOS故事板,看看第1部分和第2部分。我发现它们最有帮助。

Scroll down to "Beginning iOS storyboards" and have a look at part 1 and part 2. I found them most helpful.

这篇关于Xcode Storyboard是否应该支持带有“动态原型”单元格的UITableView的段落?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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