【问题标题】:Are UITableViews laid out in Interface Builder using the "Static Cells" option modifiable via code? [duplicate]UITableViews 是否在 Interface Builder 中使用“静态单元”选项通过代码修改? [复制]
【发布时间】:2012-06-22 06:25:07
【问题描述】:

可能重复:
UITableView set to static cells. Is it possible to hide some of the cells programmatically?

使用故事板,UITableView 可以通过将内容模式更改为“静态单元”而不是“动态原型”来完全在 Interface Builder 中布局。这在创建某些类型的 UI 时非常有用,但它似乎有其局限性。

我想使用静态单元格布局布局,但我希望表格视图的一部分根据另一个表格视图单元格中的开关显示/隐藏自身。这是否可以使用静态单元格,还是我必须采用传统方法?

【问题讨论】:

    标签: objective-c ios uitableview storyboard uistoryboard


    【解决方案1】:

    您可以尝试以下解决方案来隐藏单元格:UITableView set to static cells. Is it possible to hide some of the cells programmatically?

    然后使用开/关 BOOL 显示/隐藏它们。

    【讨论】:

    • 这不是答案,应该是重复标志。
    • 我的错,我还没有掌握标记的窍门。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-05
    • 1970-01-01
    相关资源
    最近更新 更多