简体   繁体   English

如何在“接口”构建器中为“设置”类型的接口设置表视图

[英]how do I set up a table view in interface builder for a 'settings' type interface

So I guess the table view has been designed around the idea of using dynamic data received at run time, but I want to make a settings type app where all of the cell values are known as I build it, so I was hoping to be able to set the section / row configuration, labels ect, as well as the properties for each cell (whether it has other views inside it like a switch, or whether it is a button etc) all in interface builder. 因此,我想表视图是围绕使用在运行时接收到的动态数据的想法而设计的,但是我想创建一个设置类型的应用程序,在此应用程序中,所有单元格值都将在构建时被知道,因此我希望能够可以在界面生成器中设置节/行的配置,标签等,以及每个单元格的属性(是否在其中像开关一样具有其他视图,或者是否是按钮等)。

can I do that? 我能做到吗? how? 怎么样?

I am using xcode 4.4.1 我正在使用xcode 4.4.1

To use static cell content you have to make sure that you are adding a UITableViewController not just a UITableView dragged into a UIViewController . 要使用静态单元格内容,您必须确保要添加UITableViewController而不只是将UITableView拖放到UIViewController The latter requires dynamic prototypes. 后者需要动态原型。

Once you've added the table view controller to your storyboard it is as simple as selecting "static cells" in the attributes inspector. 将表视图控制器添加到情节提要中后,就像在属性检查器中选择“静态单元格”一样简单。 From there you can drag and drop UITableViewCells and modify them as you wish. 从那里,您可以拖放UITableViewCells并根据需要对其进行修改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Interface Builder设置UIScreenEdgePanGestureRecognizer? - How do I set up an UIScreenEdgePanGestureRecognizer using Interface Builder? 如何将接口构建器中的UITabBarContoller设置为根视图控制器? - How do you set UITabBarContoller in interface builder as root view controller? 如何将 Interface Builder 中的视图连接到 Xcode 11 中另一个框架的超类中定义的 IBOutlet - How do I hook up a view in Interface Builder to an IBOutlet defined in a superclass from another framework in Xcode 11 如何在Xcode Interface Builder中向表视图控制器(带有静态单元格)添加导航项? - How do I add a navigation item to a Table View Controller (with static cells) in Xcode Interface Builder? 如何在Interface Builder中组成根视图的子视图? - How do I compose a subview of the root view in Interface Builder? 如何在Interface Builder中构建视图,然后以编程方式与之交互? - How do I build a view in Interface Builder then interact with it later programmatically? 如何在Xcode Interface Builder中设置UIRefreshControl的目标? - How do I set the target of a UIRefreshControl in Xcode Interface Builder? 在Interface Builder中设置接口并在for循环中重用 - Set up interface in Interface Builder and reuse it in for loop 这些设置在 Interface Builder 中有什么作用? - What do these settings do in Interface Builder? Xcode界面构建器:未设置静态表视图单元格字体 - Xcode interface builder: Static table view cell font is not being set
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM