是否可以在没有故事板的情况下在 Interface Builder 中创建原型单元? [英] Is it possible to create prototype cells in Interface Builder without story boards?
问题描述
在 WWDC 视频Session 309 - Introducing Interface Builder Storyboarding"中,演讲者添加了一个表视图控制器并在 IB 中创建了一个单元格,该单元格可以直接链接到应用程序中的插座(视频中大约 13:30).
In the WWDC video "Session 309 - Introducing Interface Builder Storyboarding" the speaker adds a table view controller and creates a cell in IB that can be directly linked to outlets in the app (at about 13:30 in the video).
这可以在没有故事板的情况下完成吗?如果可以,该怎么做?
Can this be done without story boards and if so, how to do it?
推荐答案
您可以创建一个仅包含表格单元格的 nib 文件,将类设置为自定义 UITableViewCell 子类,并将任何单元格子视图链接到类中的插座.
You can create a nib file with just a table cell in it, set the class to a custom UITableViewCell subclass, and link any cell subviews to outlets in the class.
这篇关于是否可以在没有故事板的情况下在 Interface Builder 中创建原型单元?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!