【发布时间】:2020-06-10 18:29:29
【问题描述】:
我有一个带有 dateCreated 属性的 Realm 对象:
class Category: Object {
@objc dynamic var name : String = ""
@objc dynamic var itemn : String = ""
@objc dynamic var dateCreated : String = ""
var parentCategory = LinkingObjects(fromType: Datee.self , property: "cetegories")
}
我希望能够通过 var dateCreated 查询所有类别,以便对它们进行计数并在我的 tableView 中创建适当的数量或行。
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
}
【问题讨论】:
-
当你说你要按dateCreated查询所有类别的时候,你的意思是要查询所有带有非空字符串变量dateCreated的类别吗?
标签: ios swift realm realm-mobile-platform