I have a class which contains a method to download data from my server. This is in the form of JSON, but is parsed and put into an array. As this is a ‘model’ file, what would be the best way to make it so that multiple ‘controllers’ can access this data?
Share
Hang it off the app delegate, stick it in a global variable, or declare a class method in appropriate spot that returns it.
Better yet, start thinking now about having a proper model layer that, among other things, can manage this data. That will make refactoring easier in the future as your application evolves.