Can I create a shared Realm result object?
I am trying to replicate the NSFetchedResults controller but with Realm support. My problem is that with the RealmSwift map, I cannot create a shared Results object. He wants a certain type.
var objects: Results<Object> = Realm().objects(Object)
compiles but fails when subclass of controller is presented.
+3
Nate mann
source
to share
1 answer
I'm not sure how your code even compiles as there are two assignments in this statement:
var objects = Results<Object> = Realm().objects(Object)
The call Realm().objects(Object)
returns a common Results
, specialized in Object
so Results
generic.
0
jpsim
source
to share