RealmCollectionChange) in switch change { case let .Initial(change): ... case let .Update(change, deletions, insertions, modifications): ... case let .Error(error): ... } }
dynamic var age = 0 let dogs = List<Dog>() } class Dog: Object { dynamic var name = "" var owners: [Person] { return linkingObjects(Person.self, forProperty: "dogs") } }
dynamic var age = 0 let dogs = List<Dog>() } class Dog: Object { dynamic var name = "" var owners: [Person] { return linkingObjects(Person.self, forProperty: "dogs") } }
dynamic var age = 0 let dogs = List<Dog>() } class Dog: Object { dynamic var name = "" let owners = LinkingObjects(fromType: Person.self, property: "dogs") }
dynamic var age = 0 let dogs = List<Dog>() } class Dog: Object { dynamic var name = "" let owners = LinkingObjects(fromType: Person.self, property: "dogs") }
nil") .sorted("modificationDate", ascending: false) .addNotificationBlock { (changes: RealmCollectionChange) in switch changes { case let .Initial(results): ... case let .Update(results, deletions, insertions, modifications): ... case let .Error(error): ... } } ؙؒٔכغحؙؚٓؐٝسד㹋遤ׁծ 㸣✪׃儗挿ד؝٦ٕغحָؙㄎל
0 dynamic var name = “" } class User: Object { dynamic var id = 0 dynamic var name = "" class override func indexedProperties() -> [String] { return ["name"] } }