There are at least 2 main collection types used in Realm:
The relevant description from the documentation on a Results
object says:
Results is an auto-updating container type in Realm returned from object queries.
Because I want my UITableView
to respond to any changes on the Realm Object Server, I really think I want my UITableView
to be backed by a Results
object. In fact, I think I would always want a Results
object to back my UI for this reason. This is only reinforced by the description of a List
object in the documentation:
List is the container type in Realm used to define to-many relationships.
Sure seems like a List
is focused on data modeling... So, being new to Realm and just reading the API, I'm thinking the answer is to use the Results
object, but the tutorial (Step 5) uses the List
object while the RealmExamples sample code uses Results
.
What am I missing? Should I be using List
objects to back my UITableViews
? If so, what are the reasons?