Things are getting messy in my app so would like to do a clean up. The first thing that has come to mind is to take my NSDictionary
which is my model for my app and put it into it's own file. I feel this would give me much more flexibility.
I know that this is possible but how do I go about doing this? My search for information has failed.
Any guides or tutorials you can link me to would be helpful.
UPDATE
Imagine 3 controllers:
CollectionViewController 1 - (Displays clothing items. The next controller is pushed when a button called "refine" is tapped)
TableViewController 2 - (Displays a list of filtering options e.g. refine by colour, size. The next controller is pushed depending on what row button was tapped.)
ViewController 3 - (Displays switches to turn on filtering options. When selection for a page is made a done button is tapped and I'm taken back to TableViewController 2)
Now a customer needs to know what has been selected for each filter by option in TableViewController 2
. So let's say for gender they selected "male" for colour they selected "blue", "green" and "black". There is a label just underneath the specific rows title that will display these selections.
Gender -male
Colour - blue, green, black
This way they know what they have selected. I also need to pass the state of the switch. The goal here is to make it so the user can go back to CollectionViewController 1
and return back to TableViewController 2
and still see what has been selected and go back to ViewController 3
and see what was switched on.
I needed a sensible way to keep track of my data. Setting everything controller by controller in the h files became messy. I found myself creating properties over and over again.
From what I've read via the web I've decided not to take the singleton route.