【问题标题】:How to write [UITableViewCell class] in swift?如何快速编写[UITableViewCell 类]?
【发布时间】:2014-06-15 06:13:22
【问题描述】:

如何在 Swift 中写 [UITableViewCell class]?
在 Swift 中,我尝试使用 UITableViewCell.class(),但它被划掉了。我想知道使用的等效方法是什么。我首先尝试调用self.tableView.registerClass(UITableViewCell.class(), forCellReuseIdentifier: defaultCellIdentifier) 方法。

【问题讨论】:

    标签: ios uitableview swift


    【解决方案1】:

    不要使用UITableViewCell.class(),而是在Swift 中尝试UITableViewCell.self。

    【讨论】:

    • 什么数组? registerClass:forCellReuseIdentifier: 不会在任何地方请求数组,它的 Swift 等价物也不会。
    猜你喜欢
    • 1970-01-01
    • 2014-12-09
    • 2016-05-06
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-14
    • 1970-01-01
    相关资源
    最近更新 更多