I have a view controller placeViewController which pulls in a bunch of Place objects, and from these loads and populates a matching bunch of PlaceView objects which are then displayed as subviews to its main view.
I need to update these views periodically which requires information from the model and other places to be pushed into the views
How should I properly structure this?
-
Keep an array of
Placeobjects and give the model aPlaceViewproperty to store pointers to the views -
Keep an array of
PlaceViewobjects and give the view aPlaceproperty to store pointers to the places -
Keep both arrays and use a lot of
indexOfObjectobjectAtIndexto jump between them -
Some other way??
Well basvk got the answer in his comment but hasn’t posted an actual answer for me to mark correct.
So here it is: “I would create a
NSMutableArraywithPlaceViewobjects. And thePlaceViewclass holds a@property Place *place“