我试图按照这篇教程的要求,为UITableViewCell
添加两个标签。
10. Drag objects from the Library onto the cell.
For this example, drag two label objects and position them
near the ends of the cell (leaving room for the accessory view).
当我将TableView作为Table View Controller创建时,一切正常。我可以从库中将标签拖动到单元格中。
但是,当我将TableView作为更通用的View Controller的一部分创建时,我无法将标签从库中拖动到单元格中。
复制步骤如下:
1.从库中将新的View Controller拖到storyboard中。 2.将Table View从库中拖到新的View Controller中。保留默认设置。确保存在一个原型单元格。 3.尝试将标签(或任何其他对象)从库中拖动到Table View的原型单元格中。不可能。
使用来自库的Table View Controller组合执行步骤1和2可以使步骤3成为可能。
那么,我该如何将我的标签放入原型单元格?