假设您要删除Notofications的所有对象,
你可以试试这个
let realm = Realm()
realm.write {
let allNotifications = realm.objects(Notifications)
realm.delete(allNotifications)
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2501 次 |
| 最近记录: |